Bubble's Styles system lets you create named Element Styles and Style Variables for fonts and colors that apply across your entire app. This tutorial covers creating styles, applying them to elements, updating globally, and using style variables for consistent spacing, typography, and color management throughout your Bubble application.
Overview: Saving and Applying Styles in Bubble
Bubble's Styles tab provides a design system for your app — create named styles once and apply them to any element. When you update a style, every element using it updates automatically. This tutorial walks through creating Element Styles, setting up Style Variables for colors and fonts, applying styles to elements, and managing your style library. Essential for any builder who wants a consistent, professional-looking app that is easy to maintain.
Prerequisites
- A Bubble account with an existing app
- Basic familiarity with Bubble's Design tab and element properties
- A clear idea of your app's color scheme and fonts
- Understanding of basic design properties (font size, colors, borders)
Step-by-step guide
Navigate to the Styles tab and understand its sections
Navigate to the Styles tab and understand its sections
Click the Styles tab in the left sidebar of the Bubble editor. You will see three main sections: Element Styles (reusable collections of visual properties for specific element types), Style Variables (font and color variables that can be referenced across styles), and Color Variables (app-wide color definitions). Element Styles are organized by element type — Text styles, Button styles, Input styles, Group styles, etc. Each style stores all visual properties for that element type: font, size, color, background, borders, padding, shadows, and more.
Expected result: You understand the Styles tab layout and the difference between Element Styles, Style Variables, and Color Variables.
Create Color Variables for your app's palette
Create Color Variables for your app's palette
In the Styles tab, click on Style Variables, then focus on the Color Variables section. Click to add new color variables for your palette: Primary (#2563EB or your brand color), Primary Light (#DBEAFE), Text Dark (#111827), Text Muted (#6B7280), Background (#FFFFFF), Surface (#F9FAFB), Border (#E5E7EB), Success (#10B981), Warning (#F59E0B), and Danger (#EF4444). Name them clearly so anyone editing the app knows what each color is for. These variables can be referenced in any style or directly on elements.
Pro tip: Limit your palette to 8-12 color variables maximum — more than that leads to inconsistency and confusion.
Expected result: A complete set of named color variables that serve as your app's design palette.
Create font Style Variables for typography
Create font Style Variables for typography
Still in Style Variables, create font variables for your typography system. Add variables for font families: Font Primary (like Inter or Poppins) and Font Secondary (like your heading font if different). Create size variables if needed, though you will primarily set sizes in Element Styles. Choose a maximum of two font families — one for headings and one for body text. If using a Google Font, make sure it is loaded in your app settings (Settings → SEO/Metatags → Header).
Expected result: Font variables defined that you can reference when creating Element Styles for text elements.
Create Element Styles for your common text levels
Create Element Styles for your common text levels
In the Element Styles section, click on Text to see existing text styles. Create new styles for each text level in your hierarchy: Heading XL (font: Primary, size: 36px, weight: bold, color: Text Dark), Heading LG (28px, semibold), Heading MD (22px, semibold), Body (16px, regular, Text Dark), Body Small (14px, regular, Text Muted), and Caption (12px, regular, Text Muted). For each style, set the font family from your Style Variables, size, weight, line height (1.5 for body, 1.2 for headings), and color from your Color Variables.
Expected result: A complete set of text Element Styles covering all heading levels, body text, and caption styles.
Create Element Styles for buttons, inputs, and groups
Create Element Styles for buttons, inputs, and groups
Create Button styles: Button Primary (background: Primary color, text: white, padding: 12px 24px, border-radius: 8px, font: 16px semibold), Button Secondary (background: transparent, border: 1px Primary, text: Primary, same padding and radius), Button Ghost (no background, no border, text: Primary). Create Input styles: Input Default (border: 1px Border color, border-radius: 8px, padding: 10px 16px, font: Body). Create Group styles: Card (background: white, border: 1px Border, border-radius: 12px, padding: 24px) and Section (padding: 48px 24px).
Expected result: Reusable styles for buttons, inputs, and groups that match your design system.
Apply styles to elements across your app
Apply styles to elements across your app
Go to the Design tab and select any Text element. In the Property Editor on the right, look for the Style dropdown at the top of the Appearance section. Click it and select one of your named styles (like Heading LG or Body). The element immediately inherits all the properties from that style. Repeat for all elements on the page. When you apply a style, you can still override individual properties on that specific element — overrides appear as blue highlighted values in the Property Editor. To remove an override and revert to the style's default, click the blue highlight.
Pro tip: Right-click a styled element and select 'Detach style' to break the connection, or 'Reset style' to remove all overrides and match the style exactly.
Expected result: All elements on the page use named styles from your Styles tab, ensuring visual consistency.
Update styles globally to change your entire app
Update styles globally to change your entire app
To see the power of styles, go back to the Styles tab and modify one of your styles — for example, change the Heading LG font size from 28px to 30px, or update the Primary color variable from blue to green. Every element in your app that uses that style or color variable updates immediately across all pages. This is why the Styles system is so powerful: you make one change in one place, and your entire app updates. Use this for rebrands, design tweaks, or A/B testing different visual treatments.
Expected result: A single style change in the Styles tab updates every element using that style across all pages simultaneously.
Complete working example
1STYLE SYSTEM SUMMARY2=====================34COLOR VARIABLES:5 Primary: #2563EB6 Primary Light: #DBEAFE7 Text Dark: #1118278 Text Muted: #6B72809 Background: #FFFFFF10 Surface: #F9FAFB11 Border: #E5E7EB12 Success: #10B98113 Warning: #F59E0B14 Danger: #EF44441516FONT VARIABLES:17 Font Primary: Inter (or your chosen font)18 Font Secondary: Inter (or heading font)1920TEXT ELEMENT STYLES:21 Heading XL: 36px / Bold / Text Dark / Line height 1.222 Heading LG: 28px / Semibold / Text Dark / Line height 1.223 Heading MD: 22px / Semibold / Text Dark / Line height 1.324 Body: 16px / Regular / Text Dark / Line height 1.525 Body Small: 14px / Regular / Text Muted / Line height 1.526 Caption: 12px / Regular / Text Muted / Line height 1.42728BUTTON ELEMENT STYLES:29 Button Primary:30 Background: Primary | Text: White31 Padding: 12px 24px | Border-radius: 8px32 Font: 16px Semibold33 Hover: Primary darkened 10%3435 Button Secondary:36 Background: Transparent | Border: 1px Primary37 Text: Primary | Same padding/radius38 Hover: Primary Light background3940 Button Ghost:41 Background: Transparent | No border42 Text: Primary | Same padding43 Hover: Surface background4445INPUT ELEMENT STYLES:46 Input Default:47 Border: 1px Border color | Border-radius: 8px48 Padding: 10px 16px | Font: 16px Regular49 Focus: Border Primary color50 Placeholder: Text Muted5152GROUP ELEMENT STYLES:53 Card:54 Background: White | Border: 1px Border55 Border-radius: 12px | Padding: 24px5657 Section:58 Padding: 48px 24px | No border | No background5960APPLICATION PROCESS:61 1. Create Color Variables (palette)62 2. Create Font Variables (families)63 3. Create Element Styles (text, buttons, inputs, groups)64 4. Apply styles to all existing elements via Style dropdown65 5. Use styles for all new elements going forward66 6. Update globally via Styles tab when neededCommon mistakes when saving and apply styles and style variables across your Bubble.io app:
Why it's a problem: Setting styles directly on elements instead of using the Styles tab
How to avoid: Always create a named style in the Styles tab first, then apply it to elements using the Style dropdown
Why it's a problem: Creating too many similar styles with minor variations
How to avoid: Create one style per element type and use Color Variables or per-element overrides for variations
Why it's a problem: Not using Color Variables and hardcoding hex values in styles
How to avoid: Always reference Color Variables in your Element Styles so palette changes propagate automatically
Best practices
- Create all Color Variables before creating any Element Styles
- Limit your color palette to 8-12 named variables
- Use a maximum of two font families across your entire app
- Create Element Styles for every common element type: text, buttons, inputs, groups
- Apply styles via the Style dropdown rather than setting properties individually on elements
- Use per-element overrides sparingly — prefer creating a new style if the variation is significant
- Name styles clearly with their purpose: Heading XL, Button Primary, Input Default, Card
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to create a design system for my Bubble app with consistent colors, typography, and button styles. Can you help me plan the color palette, font hierarchy, and element styles I should create?
Help me set up a complete style system. Create Color Variables for my brand (primary color: [your color]), text styles for headings and body, button styles for primary and secondary actions, and input styles. Apply them across all my pages.
Frequently asked questions
What is the difference between Element Styles and Style Variables?
Style Variables are individual values (like a color or font family) that can be referenced across multiple Element Styles. Element Styles are complete collections of visual properties for a specific element type. Think of Style Variables as ingredients and Element Styles as recipes.
Can I override a style on a specific element?
Yes. After applying a style, you can change individual properties on that element. Overrides appear as blue highlights in the Property Editor. Click the blue highlight to revert the override and match the style.
Will updating a style change elements that have overrides?
Only the non-overridden properties update. If you override the font size on a specific element, changing the style's font size will not affect that element. Other elements using the style without overrides will update.
How many styles should I create?
Create the minimum needed for consistency. A typical app needs 5-7 text styles, 2-3 button styles, 1-2 input styles, and 2-3 group styles. That is roughly 12-15 Element Styles total.
Can I export my styles to use in another Bubble app?
Not directly. However, you can duplicate your app (which copies all styles) or use Bubble templates that include your style system. There is no standalone style export feature.
Can RapidDev help set up a design system for my Bubble app?
Yes. RapidDev can create a complete design system including Color Variables, typography hierarchy, Element Styles for all component types, and apply them consistently across all pages of your Bubble app.
Do styles affect app performance?
No. Styles are applied at build time and have no runtime performance impact. Using styles consistently actually improves performance slightly because the browser can cache and reuse shared CSS properties.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation