Retool is an open-source tool that enables developers to create unique internal tools and processes fast and efficiently. To simplify your team’s workflows and boost productivity, Retool lets you build bespoke user interfaces and integrate with a number of other services, including databases and APIs. In this blog post, we’ll go through how to use Retool to create a unique internal tool with subsections to make it simple for you to traverse the material.
Setting up Retool
Before we dive into building our custom internal tool, let’s first go over the setup process for Retool.
- Sign up for an account at retool.com.
- Install the Retool CLI by running
npm install -g @retool/cli
. - Create a new Retool project by running
retool init
. - Run
retool start
to start the Retool server. - Navigate to
http://localhost:3000
in your browser to access the Retool dashboard.
Building your first internal tool
Now that we have Retool set up, let’s start building our first custom internal tool.
- From the Retool dashboard, click on “New Resource” in the top right corner.
- Select the type of resource you want to create. For this example, we’ll be using a MySQL database.
- Enter the necessary connection details for your database and click “Create”.
- Click on “New Query” in the top right corner.
- Select the database resource you just created from the dropdown menu.
- Enter a SQL query in the editor and click “Run Query”.
You should now see the results of your query displayed in the Retool UI.
Creating a custom UI
Now that we’ve learned how to run queries against a database, let’s create a custom UI for our internal tool.
- From the Retool dashboard, click on “New UI” in the top right corner.
- Drag and drop UI components from the left-hand panel onto the canvas. You can use a variety of components, such as text inputs, buttons, and tables, to create your custom UI.
- Use the Properties panel on the right to customize the appearance and behavior of each component.
- Bind your UI components to data from your database using the “Bindings” panel.
- Click “Save” in the top right corner to save your UI.
Adding subsections
Now that we have a basic custom UI set up, let’s add some subsections to organize our content.
- From the Retool dashboard, click on the UI you want to add subsections to.
- Drag and drop a “Tabs” component onto the canvas.
- Use the Properties panel to customize the appearance and behavior of the Tabs component.
- Drag and drop additional UI components onto the canvas within each tab.
- Use the “Bindings” panel to bind your UI components to data from your database, just like you did before.
With the Tabs component, you can easily organize your content into separate subsections, making it easier for your team to navigate and use your internal tool.
Wrapping up
In this article, we went through the fundamentals of utilizing Retool to develop custom internal tools, including how to install it, use it to conduct database queries, make a custom user interface, and add subsections to categorize your material. You can quickly create unique tools and workflows with Retool.