|
1 | 1 | --- |
2 | 2 | slug: /workspace/theme |
3 | 3 | title: Theme |
4 | | -# description: |
5 | | -# tags: |
6 | | -sidebar_position: 2 |
7 | | -# keywords: |
| 4 | +description: Learn how to manage colors, typography, and style constants in Dreamflow’s Theme panel to create a consistent, cohesive design across your app. |
| 5 | +tags: [theme, dreamflow, flutter] |
| 6 | +sidebar_position: 3 |
| 7 | +keywords: [dreamflow theme, app theme, dark mode, light mode, colors, typography, style] |
8 | 8 | --- |
9 | 9 |
|
10 | | -# Theme |
| 10 | + |
| 11 | +# Theme |
| 12 | +The **Theme** panel in Dreamflow provides a centralized way to manage the visual identity of your app. Instead of hardcoding styles in multiple places, you can define colors, typography, and style values once and reuse them consistently across your project. This ensures your app maintains a polished, cohesive look while making design updates faster and easier. |
| 13 | + |
| 14 | +## Colors |
| 15 | + |
| 16 | +Colors define the overall mood and branding of your app. In Dreamflow, colors are grouped into three categories: |
| 17 | + |
| 18 | +- **Brand Colors**: Represent your brand’s primary palette (e.g., primary, secondary, accent). Use these to give your app its unique identity. |
| 19 | +- **Utility Colors**: These are functional colors that support layout and contrast. |
| 20 | +- **Semantic Colors**: Contextual colors that represent meaning within the app for states like errors or warnings. |
| 21 | + |
| 22 | +:::info |
| 23 | + |
| 24 | +Each brand color includes a **hex value** (e.g., `#7C4DFF`) and an **opacity setting** so you can fine-tune how they appear in your design. |
| 25 | + |
| 26 | +::: |
| 27 | + |
| 28 | +### Dark Mode |
| 29 | + |
| 30 | +Dreamflow makes it easy to design and preview your app in both **Light Mode** and **Dark Mode**. In the Theme panel, you can select **Dark Mode** from the dropdown. Set your colors for dark mode, then switch the mode in the Preview canvas to instantly see your design in action. |
| 31 | + |
| 32 | +:::info |
| 33 | +When you switch modes, Dreamflow automatically applies the corresponding color palettes, allowing you to check readability, contrast, and overall aesthetics in real time. |
| 34 | +::: |
| 35 | + |
| 36 | +<div style={{ |
| 37 | + position: 'relative', |
| 38 | + paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding |
| 39 | + height: 0, |
| 40 | + width: '100%'}}> |
| 41 | + <iframe |
| 42 | + src="https://demo.arcade.software/OKojpnMFTASQci348sSe?embed&show_copy_link=true" |
| 43 | + title="" |
| 44 | + style={{ |
| 45 | + position: 'absolute', |
| 46 | + top: 0, |
| 47 | + left: 0, |
| 48 | + width: '100%', |
| 49 | + height: '100%', |
| 50 | + colorScheme: 'light' |
| 51 | + }} |
| 52 | + frameborder="0" |
| 53 | + loading="lazy" |
| 54 | + webkitAllowFullScreen |
| 55 | + mozAllowFullScreen |
| 56 | + allowFullScreen |
| 57 | + allow="clipboard-write"> |
| 58 | + </iframe> |
| 59 | +</div> |
| 60 | +<p></p> |
| 61 | + |
| 62 | +### Best Practices |
| 63 | + |
| 64 | +To get the most out of Dreamflow’s color system, keep these guidelines in mind: |
| 65 | + |
| 66 | +- **Maintain contrast**: Always ensure sufficient contrast between foreground (text/icons) and background colors for accessibility. |
| 67 | +- **Be consistent**: Use brand colors consistently for key elements such as buttons and text so users quickly learn their meaning. |
| 68 | +- **Leverage semantic colors**: Don’t reinvent error, warning, or success colors; stick to semantic definitions for clarity. |
| 69 | +- **Test both modes**: Always check your design in **Light Mode** and **Dark Mode** to ensure readability and visual harmony. |
| 70 | +- **Avoid color overload**: Use a limited palette so your app feels cohesive rather than chaotic. |
| 71 | + |
| 72 | +## Typography |
| 73 | + |
| 74 | +Typography in Dreamflow ensures that text styles remain consistent throughout your app. It is divided into categories that map to different use cases: |
| 75 | + |
| 76 | +- **Display**: Large, prominent text for headers, hero sections, or landing screens. |
| 77 | +- **Headline**: Sub-headers or secondary emphasis text. |
| 78 | +- **Title**: Standard section titles and key labels. |
| 79 | +- **Body**: Paragraphs, descriptions, and content-heavy areas. |
| 80 | +- **Label**: Smaller text for buttons, captions, or UI labels. |
| 81 | + |
| 82 | +Each category can be customized to align with your design system. |
| 83 | + |
| 84 | +## Style Constants |
| 85 | + |
| 86 | +Style constants define reusable design values across your app, helping you maintain consistency in both light and dark modes. |
| 87 | + |
| 88 | +- **Light Mode Colors**: Default color set when your app is displayed in light mode. |
| 89 | +- **Dark Mode Colors**: Color overrides for dark mode. |
| 90 | +- **Font Sizes**: Centralized definitions for text sizing. |
0 commit comments