Design
Design within Retool is supported via a wide range of capabilities, settings, configurations, and approaches. The following are a distillation of some of the repeatable practices.
Best practices
The best Retool applications have consistent user experience design practices. These practices range from the use of Retool themes, color control, page layout, and navigation to name a few.
Design product features
Themes and colors
Resource: https://retool.com/components/color-input Resource: https://docs.retool.com/docs/app-themes
Themes are the best way to maintain a clean and org-wide design pattern. We expose a number of key values that can be globally configured in the organization settings page. These are applied directly to apps, creating a unified branding and color schema.
Most components have a number of color and style options that can be modified on a per-app level. You can reference your theme colors in your component styles, for example {{theme.secondary}}
.
Best practices for color in apps:
- There should only be 2 main colors in an app. A primary color or brand color to set brand identity, usually in the background of a navigation header. And an accent color to draw attention to important actions.
- Solid colors draw a lot of attention, so use them sparingly. Use semi-transparent backgrounds.
Custom CSS (org level and app level)
You can add custom CSS to make granular component edits. You can either do this globally or locally for one app. To find the component you wish to target, you’ll need to inspect the element using your browser’s Inspector tool. We prefix our components with _retool-, so if you have a component named ‘textInput1”, it would have a class of _retool-textInput1.
We generally recommend that you don’t rely too heavily on this practice, as we sometimes change the underlying class names, which may affect the CSS selectors.
Custom CSS snippet import family from CDN
The following example provides CSS for importing from a content delivery network.
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital@0;1&display=swap');
.editor-canvas-container * {
font-family: cursive !important;
}
.retool-canvas * {
font-family: cursive !important;
}