Retool does not natively use Tailwind CSS, but you can apply Tailwind-like styling through three approaches: Retool's built-in Theme editor for global color and typography changes, component-level Custom CSS for utility-class-style overrides, and Custom Components (React-based) where full Tailwind CSS is supported. Choose the approach that matches how much styling control your internal tool requires.
| Fact | Value |
|---|---|
| Tool | Tailwind |
| Category | Design |
| Method | Design-to-Code Bridge |
| Difficulty | Beginner |
| Time required | 30 minutes |
| Last updated | April 2026 |
Styling Retool Apps: From Tailwind Patterns to Custom Components
Retool's component system renders UI using its own design tokens and React component library. Because Retool apps run in a sandboxed iframe environment with their own CSS pipeline, you cannot directly apply Tailwind utility classes (like bg-blue-500 or rounded-lg) to built-in Retool components by adding class names to a class attribute — Retool's components do not expose an HTML class attribute to builders in the visual editor.
However, the visual goals of Tailwind — consistent spacing, a defined color palette, typography scale, and utility-like CSS patterns — can be achieved in Retool through three complementary approaches. First, Retool's Theme editor (available from the app menu → Appearance) lets you set organization-wide design tokens including primary colors, background colors, font families, and border radius values. This covers the majority of brand consistency requirements. Second, every Retool component has a Custom CSS section in its properties panel, where you can write raw CSS selectors targeting Retool's internal class names — this allows border, shadow, padding, and color overrides at the component level. Third, for truly custom UI that requires Tailwind's full utility vocabulary, Retool's Custom Component feature lets you write React code in an isolated iframe with its own dependencies, including Tailwind via CDN.
The right approach depends on your use case. For most internal tools, the Theme editor plus selective Custom CSS overrides achieves a clean, brand-consistent look without reaching for Tailwind at all. Custom Components with Tailwind make sense when you need a specific UI pattern — a custom card layout, a styled timeline, a complex form with Tailwind-specific design — that Retool's built-in components cannot replicate.
Integration method
Tailwind CSS utility classes cannot be added directly to Retool's built-in components because Retool renders its UI in a sandboxed environment that does not process Tailwind's JIT compiler or CDN class injection. Instead, you apply Tailwind-like styling through three channels: Retool's Theme editor for global design tokens (colors, typography, spacing), component-level Custom CSS fields for targeted overrides, and Custom Components built in React where you can import Tailwind via CDN or a bundled stylesheet.
Prerequisites
- A Retool account with at least one app to style (Theme editor is organization-wide; Custom CSS is per-component)
- Basic knowledge of CSS — understanding selectors, properties, and specificity for Custom CSS overrides
- For Custom Components: familiarity with React and a Retool plan that includes Custom Components (Starter or higher)
Step-by-step guide
Understand Retool's styling architecture
Before applying any styling, it helps to understand how Retool renders its components and where styling customization is possible. Retool apps are server-rendered React applications running in an iframe. Each built-in component (Table, Button, TextInput, etc.) is a React component from Retool's component library with its own internal class names and CSS. Because these components do not accept arbitrary className props, you cannot pass Tailwind utility classes directly through the visual editor. What you can control is: global design tokens through the Theme editor, component-specific visual properties through the Properties panel on the right side of the editor (colors, fonts, border styles for many components), and arbitrary CSS overrides through the Custom CSS section available in many components. To access Custom CSS for a component: click the component to select it, scroll to the bottom of the Properties panel on the right, and look for the 'Custom CSS' section. This opens a CSS editor where you write standard CSS. Retool applies your CSS inside the component's scope, so you can target Retool's internal class names using the browser's developer tools to inspect the rendered HTML and discover which classes to override. This inspect-and-override workflow is the foundation of Tailwind-style utility overrides in Retool.
Pro tip: Use Chrome DevTools to inspect a Retool component's rendered HTML to find the CSS class names you can target in Custom CSS. Right-click a component in your running Retool app and select Inspect to see the DOM structure.
Expected result: You understand that Tailwind classes cannot be added directly to built-in components, but Custom CSS and the Theme editor provide equivalent styling control. You know where to find the Theme editor and the Custom CSS section.
Configure the Theme editor for global design tokens
Retool's Theme editor is the most efficient way to apply consistent brand styling across all components in an organization. Access it from the app editor: click the app menu (three dots or gear icon in the top toolbar) → Appearance, or from the organization settings at Settings → Appearance. The Theme editor presents a panel with design token categories: Colors (Primary, Accent, Background, Text, Border, Success, Warning, Error, Info), Typography (Font Family, Font Size base, Font Weight), Spacing (Base unit), and Border Radius. For each color token, enter a hex value that matches your brand or design system. The Primary color affects buttons, checkboxes, toggle switches, and focused input borders throughout all apps using the theme. Background color affects app canvas, containers, and form backgrounds. To mirror a Tailwind color palette: use Tailwind's color values directly. For example, Tailwind's blue-600 (#2563EB) as your primary, slate-50 (#F8FAFC) as background, and slate-900 (#0F172A) as the primary text color. For Font Family, enter a Google Fonts import URL in the Custom CSS section of the theme, or use system fonts that match your Tailwind config (Retool uses system-ui by default; Tailwind's sans stack starts with ui-sans-serif). After configuring the theme, click Save and Apply. The theme applies to all new apps and can be optionally applied to existing apps.
1/* Custom CSS at the Theme level to import a Google Font2 Add this in the Theme editor's Custom CSS section3 This makes the font available for the Font Family token */45@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');67:root {8 /* These CSS custom properties override Retool's design tokens9 and affect all components using the default theme */10 --retool-color-primary: #2563EB;11 --retool-color-primary-hover: #1D4ED8;12 --retool-color-background-primary: #F8FAFC;13 --retool-border-radius: 8px;14 --retool-font-family: 'Inter', system-ui, -apple-system, sans-serif;15}Pro tip: Retool's Theme editor exposes CSS custom properties (CSS variables) that cascade through all components. Modifying these in the theme-level Custom CSS section is more maintainable than overriding styles in individual component CSS.
Expected result: All components in apps using the theme reflect the new colors, border radius, and font family. Buttons show the new primary color, backgrounds match the configured background token, and text uses the configured font.
Apply component-level Custom CSS for Tailwind-style overrides
For component-specific styling that goes beyond theme tokens — rounded corners on a specific container, a custom shadow on a card, padding adjustments, or styled status indicators — use the component-level Custom CSS section. Click any component in the Retool editor to select it. In the Properties panel on the right, scroll to the bottom and expand 'Custom CSS'. This opens a CSS editor scoped to that component. Write CSS targeting the component's internal class names. To find class names: run your app, right-click the component element in the browser, and select Inspect in Chrome DevTools. You will see class names like retool-container, retool-table-row, or component-specific names. Target these in your Custom CSS. For a Container component styled like a Tailwind card: target the outer wrapper class and add box-shadow, border-radius, and background-color properties. For styled status text in a Table: target the cell content class and add border-radius, padding, and background-color conditionally based on the value class. Note that Retool applies Custom CSS with some specificity — you may need !important for overrides that conflict with Retool's own component styles. This is an accepted pattern in Retool's documentation.
1/* Component Custom CSS examples — Tailwind-inspired patterns2 Applied in the component's Custom CSS section in the Properties panel */34/* Card-style container (replaces Tailwind's rounded-xl shadow-md bg-white p-6) */5.retool-container {6 border-radius: 12px !important;7 box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06) !important;8 background-color: #ffffff !important;9 padding: 24px !important;10}1112/* Status badge in a Table column (replaces Tailwind's px-2 py-1 rounded-full text-sm font-medium)13 Target Table component → Custom CSS */14.cell-content {15 display: inline-flex !important;16 align-items: center !important;17 padding: 2px 8px !important;18 border-radius: 9999px !important;19 font-size: 12px !important;20 font-weight: 500 !important;21}2223/* Button style override (replaces Tailwind's font-semibold tracking-wide) */24.retool-button {25 font-weight: 600 !important;26 letter-spacing: 0.025em !important;27 text-transform: none !important;28}Pro tip: Right-click any Retool component in your running app and use Chrome DevTools to inspect the rendered HTML. This reveals the actual CSS class names you can target in Custom CSS — class names vary by component type and Retool version.
Expected result: The targeted components display the custom styling — card shadows, styled badges, or typography overrides — while maintaining their functional behavior. The overrides apply only to the specific components you edited.
Build a Custom Component with Tailwind CSS
For UI patterns that require full Tailwind utility class support — custom card grids, styled timelines, complex form layouts, or any design that Retool's built-in components cannot produce — use Retool's Custom Component feature. Navigate to the Component Panel in the editor, scroll to the 'Custom' section, and drag a 'Custom Component' onto the canvas. Select the Custom Component and click 'Edit source code' in the Properties panel — this opens a React code editor in Retool's interface. Custom Components are React apps running in an isolated iframe. Retool provides a model prop containing data you pass from your app, and an updateModel function for sending data back to Retool. To use Tailwind in a Custom Component, add the Tailwind CDN script in the component's HTML head section. In the Custom Component editor, find the HTML tab and add the Tailwind Play CDN script tag in the head. Then write your React component using Tailwind utility classes in the className prop. The Tailwind CDN processes class names at runtime, making all Tailwind utilities available. Pass data from your Retool queries to the Custom Component by editing the component's 'Model' property in the Properties panel — add JSON properties that map to your query data.
1// Custom Component React code with Tailwind CSS via CDN2// Paste this in the Custom Component's code editor34const { model, updateModel } = Retool.useRetoolContext();56const MetricCard = ({ title, value, trend, trendLabel, color }) => (7 <div className={`rounded-xl shadow-md bg-white p-6 border-l-4 ${color}`}>8 <p className="text-sm font-medium text-slate-500 uppercase tracking-wide">9 {title}10 </p>11 <p className="mt-2 text-3xl font-bold text-slate-900">12 {value}13 </p>14 <div className="mt-2 flex items-center">15 <span className={`text-sm font-medium ${16 trend >= 0 ? 'text-emerald-600' : 'text-red-600'17 }`}>18 {trend >= 0 ? '↑' : '↓'} {Math.abs(trend)}%19 </span>20 <span className="ml-2 text-sm text-slate-500">{trendLabel}</span>21 </div>22 </div>23);2425const cards = model.cards || [];2627Retool.useEffect(() => {28 // You can call updateModel to send data back to Retool29 // updateModel({ selectedCard: null });30}, []);3132return (33 <div className="p-4">34 <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">35 {cards.map((card, i) => (36 <MetricCard37 key={i}38 title={card.title}39 value={card.value}40 trend={card.trend}41 trendLabel={card.trendLabel}42 color={card.color || 'border-blue-500'}43 />44 ))}45 </div>46 </div>47);Pro tip: Use Tailwind's Play CDN (cdn.tailwindcss.com) for Custom Components rather than trying to bundle a full Tailwind build. The Play CDN processes utility classes on-the-fly in the browser, which is sufficient for Custom Component UIs.
Expected result: The Custom Component renders a card grid styled with Tailwind utility classes. Passing different data through the component model updates the cards in real time. The Tailwind styles apply correctly inside the Custom Component's iframe.
Common use cases
Apply consistent branding to a company-wide Retool app library
Your company has built 20+ Retool apps and they all use Retool's default blue theme. The design team wants all internal tools to use the company's brand colors, Inter font, and consistent border radius. Using Retool's Theme editor, you configure the primary color, background color, font family, and border radius once — and the changes propagate across all apps in the organization that use the default theme.
Configure Retool's Theme editor to match our brand: primary color #2563EB, background #F8FAFC, font family Inter, border radius 8px. Apply the theme organization-wide and document the design token values for other builders to reference.
Copy this prompt to try it in Retool
Style a data table with custom row colors and badges using CSS overrides
Your order management Retool app uses a Table component that needs styled status badges (green for completed, yellow for pending, red for failed) and alternating row backgrounds for readability. The built-in Table component supports row color configuration, but you also need the status column cells to look like styled pills. Component-level Custom CSS targeting Retool's table cell classes achieves this without needing a Custom Component.
Style the Table component in our order management app to show status values as colored pill badges. Use Custom CSS to add border-radius, padding, and background colors to the status column cells based on their value. Also add alternating row background colors and a hover state.
Copy this prompt to try it in Retool
Build a custom card layout using a Tailwind-powered Custom Component
Your Retool dashboard needs a card grid displaying product metrics — each card has an icon, a title, a large number, a trend indicator, and a footer with a link. Retool's built-in Stat component covers some of this, but not the exact layout you need. A Custom Component built with React and Tailwind CSS via CDN gives you full control over the card markup, styling, and layout — and it can receive data from your Retool queries through the Custom Component's model property.
Build a Custom Component that renders a responsive card grid. Each card receives title, value, trend, and icon props from Retool's component model. Style the cards with Tailwind utility classes (rounded-xl, shadow-md, bg-white) loaded via Tailwind CDN. Pass the card data array from a database query.
Copy this prompt to try it in Retool
Troubleshooting
Tailwind utility classes added to a component's 'Class' property have no effect
Cause: Retool's built-in components do not have a class or className attribute exposed to builders. The Component panel may show a 'Custom CSS' section but not a class name input. Adding utility class names in any text field has no effect because Tailwind's JIT or CDN is not running in Retool's component layer.
Solution: Use Retool's Custom CSS section in the Properties panel instead of class names. Translate the Tailwind utility's effect into standard CSS properties: for example, rounded-lg becomes border-radius: 8px; in Custom CSS, and shadow-md becomes a box-shadow value. Use the Theme editor for global token changes.
Custom Component Tailwind classes are not rendering — elements have no styling
Cause: The Tailwind CDN script is missing from the Custom Component's HTML template, or the script tag was placed in the React code section instead of the HTML head section.
Solution: In the Custom Component editor, switch to the HTML tab (not the code tab). Add the Tailwind Play CDN script tag inside the <head> section of the HTML template. The CDN must load before your React component renders for class names to be processed.
1<!-- Add to the HTML tab in Custom Component editor, inside <head> -->2<script src="https://cdn.tailwindcss.com"></script>Custom CSS overrides are not applying — component looks the same after adding CSS
Cause: Retool's component styles have high specificity. Your Custom CSS selectors may be correct but have lower specificity than Retool's internal styles.
Solution: Add !important to CSS properties that are not overriding correctly. This is an accepted pattern in Retool's documentation for Custom CSS. Alternatively, use more specific selectors targeting multiple levels of the component's DOM hierarchy to increase specificity without !important.
1/* Use !important for Retool component style overrides */2.retool-button {3 background-color: #2563EB !important;4 border-radius: 8px !important;5 font-weight: 600 !important;6}Best practices
- Use the Theme editor for all global design token changes (colors, fonts, border radius) before reaching for component-level Custom CSS — changes to theme tokens propagate to all components and are much easier to maintain than per-component overrides.
- Document your organization's Tailwind-to-Retool token mapping in a shared Retool app or Confluence page — for example, 'Tailwind blue-600 = Retool primary color #2563EB' — so all Retool builders use consistent values.
- Use Custom Components with Tailwind only for genuinely custom UI patterns that Retool's built-in components cannot achieve — overusing Custom Components adds maintenance overhead since they are not automatically updated when Retool releases new component versions.
- When writing component-level Custom CSS, prefix all rules with the specific component instance's CSS class (found via DevTools inspection) rather than using generic class names that could accidentally affect other components on the same canvas.
- Test Custom CSS changes in a staging Retool environment before applying them to production apps — CSS specificity issues and class name changes between Retool versions can break styling unexpectedly.
- For brand-consistent internal tools, maintain a shared 'Retool CSS Design System' snippet document with your custom CSS patterns — copy these snippets into new apps rather than rewriting the same overrides each time.
- When using Tailwind's Play CDN in Custom Components, add the tailwind.config object to the script tag to configure your brand's color tokens — this ensures Custom Component colors match the values used in the rest of your Retool theme.
Alternatives
Figma is a better starting point when you need to design and prototype the Retool app's layout and visual hierarchy before building, exporting design specs and color tokens to inform Retool's Theme settings.
Framer is an alternative when you need a marketing or public-facing page with full design freedom — Retool's styling limitations make it less suitable for customer-facing UIs, whereas Framer exports polished production sites.
Canva is useful for creating design assets (icons, background images, brand graphics) that can be exported and embedded in Retool's Image components or used as backgrounds.
Frequently asked questions
Can I use Tailwind CSS classes directly on Retool components?
No. Retool's built-in components do not expose a className or class attribute to the visual builder. Tailwind utility classes added to component text fields have no effect because Retool's component layer does not load the Tailwind CSS framework. Instead, use the Theme editor for global design tokens, component Custom CSS sections for utility-style overrides written as standard CSS properties, and Custom Components (React-based) for full Tailwind support via CDN.
Does Retool support CSS custom properties (CSS variables)?
Yes. You can define CSS custom properties in the Theme editor's Custom CSS section using :root { --my-color: #value; } and reference them in component Custom CSS fields. Retool also exposes its own CSS variables (like --retool-color-primary) that you can override at the theme level to change design tokens globally.
What is a Retool Custom Component and when should I use Tailwind in one?
A Custom Component is a React application that runs inside an isolated iframe within your Retool app, receiving data through Retool's model API and returning events back to Retool. Custom Components support full HTML, CSS, and JavaScript including any CSS framework. Use Tailwind in Custom Components when you need a specific UI layout (card grid, timeline, custom form) that Retool's built-in components cannot produce and where Tailwind's utility classes give you the fastest development path.
Will my Custom CSS break when Retool updates its component library?
Potentially yes — Retool may change internal CSS class names between versions, which would break selectors in your Custom CSS. Retool generally aims for backward compatibility but does not guarantee that internal class names are stable across major version updates. Test Custom CSS after Retool version upgrades and monitor the Retool changelog for component changes. Using Retool's Theme editor and official Properties panel styling options is more stable than Custom CSS targeting internal class names.
Can I use a different CSS framework (like Bootstrap or Chakra UI) in Retool?
Bootstrap and similar frameworks can be loaded via CDN in Custom Components the same way Tailwind is — add the CDN link in the Custom Component's HTML head section. For Retool's built-in components, the same limitation applies: you cannot apply Bootstrap classes directly. The Theme editor and Custom CSS section approach works regardless of which CSS framework you prefer — you are writing standard CSS properties, not framework classes.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation