Esta página aún no está disponible en tu idioma.
StudioCMS UI is designed on top of CSS variables, which makes it easy to customize the look of the components to match your brand. You can customize the colors, typography, radii, and more. All customization is done with a custom CSS file that you can provide to the UI integration:
In that file, you can override the CSS variables to change the look of the components. If you wanted to overwrite the primary color, it’d look like this:
If you make significant changes to the colors, remember to also adjust the light theme.
Below, you will find all the CSS variables used in StudioCMS UI. Always make sure to provide them as
HSL values without commas. You can use them in your CSS like this: background-color: hsl(var(--background-base));
.
If you want to disable the CSS injection, you can do so by setting the noInjectCSS
option to true
:
You can then include the CSS in your project manually. This is useful if you want to mix StudioCMS UI with other CSS frameworks, or if you are using the UI styling only for a subset of your components.
---// Using the virtual module to import the CSS file (recommended)import "studiocms:ui/global-css";
// Alternatively, import the CSS file directly from the packageimport "@studiocms/ui/css/global.css";---
You can edit the colors in your own project during development using the dev toolbar. In the toolbar, you will find a tab with the StudioCMS logo on it. Once clicked it will reveal a few color pickers and inputs you can use to adjust various variables. You can copy your changes to your clipboard after you are done.
Variable | Description | Default |
---|---|---|
--background-base | Base background color | 0 0% 6% |
--background-step-1 | Background color step 1 | 0 0% 8% |
--background-step-2 | Background color step 2 | 0 0% 10% |
--background-step-3 | Background color step 3 | 0 0% 14% |
--text-normal | Normal text color | 0 0% 100% |
--text-muted | Muted text color | 0 0% 54% |
--text-inverted | Inverted text color | 0 0% 0% |
--border | Border color | 240 5% 17% |
--shadow | Shadow color | 0 0% 0% |
--default-base | Default color base | 0 0% 14% |
--default-hover | Default color hover | 0 0% 21% |
--default-active | Default color active | 0 0% 15% |
--primary-base | Primary color base | 259 83% 73% |
--primary-hover | Primary color hover | 259 77% 78% |
--primary-active | Primary color active | 259 73% 67% |
--success-base | Success color base | 142 71% 46% |
--success-hover | Success color hover | 142 72% 61% |
--success-active | Success color active | 142 87% 52% |
--warning-base | Warning color base | 48 96% 53% |
--warning-hover | Warning color hover | 48 97% 70% |
--warning-active | Warning color active | 48 100% 61% |
--danger-base | Danger color base | 339 97% 31% |
--danger-hover | Danger color hover | 337 98% 37% |
--danger-active | Danger color active | 337 88% 32% |
--info-base | Info color base | 217 92% 52% |
--info-hover | Info color hover | 214 95% 58% |
--info-active | Info color active | 214 85% 52% |
--mono-base | Mono color base | 0 0% 100% |
--mono-hover | Mono color hover | 0 0% 90% |
--mono-active | Mono color active | 0 0% 95% |
Variable | Description | Default |
---|---|---|
--background-base | Base background color | 0 0% 97% |
--background-step-1 | Background color step 1 | 0 0% 90% |
--background-step-2 | Background color step 2 | 0 0% 85% |
--background-step-3 | Background color step 3 | 0 0% 80% |
--text-normal | Normal text color | 0 0% 0% |
--text-muted | Muted text color | 0 0% 24% |
--text-inverted | Inverted text color | 0 0% 100% |
--border | Border color | 263 5% 68% |
--shadow | Shadow color | 0 0% 65% |
--default-base | Default color base | 0 0% 74% |
--default-hover | Default color hover | 0 0% 81% |
--default-active | Default color active | 0 0% 91% |
--primary-base | Primary color base | 259 85% 61% |
--primary-hover | Primary color hover | 259 78% 56% |
--primary-active | Primary color active | 259 71% 50% |
--success-base | Success color base | 142 59% 47% |
--success-hover | Success color hover | 142 62% 56% |
--success-active | Success color active | 142 87% 59% |
--warning-base | Warning color base | 48 92% 46% |
--warning-hover | Warning color hover | 48 88% 43% |
--warning-active | Warning color active | 48 85% 40% |
--danger-base | Danger color base | 339 97% 31% |
--danger-hover | Danger color hover | 337 98% 37% |
--danger-active | Danger color active | 337 88% 45% |
--info-base | Info color base | 217 92% 52% |
--info-hover | Info color hover | 214 95% 58% |
--info-active | Info color active | 214 85% 52% |
--mono-base | Mono color base | 0 0% 0% |
--mono-hover | Mono color hover | 0 0% 10% |
--mono-active | Mono color active | 0 0% 5% |
Variable | Description | Default |
---|---|---|
--text-light | Light text color | 0 0% 100% |
--text-dark | Dark text color | 0 0% 0% |
--default-flat | Default flat color | var(--default-base) / 0.5 |
--default-flat-hover | Default flat hover color | var(--default-base) / 0.75 |
--default-flat-active | Default flat active color | var(--default-base) / 0.85 |
--primary-flat | Primary flat color | var(--primary-base) / 0.1 |
--primary-flat-hover | Primary flat hover color | var(--primary-base) / 0.25 |
--primary-flat-active | Primary flat active color | var(--primary-base) / 0.35 |
--success-flat | Success flat color | var(--success-base) / 0.1 |
--success-flat-hover | Success flat hover color | var(--success-base) / 0.25 |
--success-flat-active | Success flat active color | var(--success-base) / 0.35 |
--warning-flat | Warning flat color | var(--warning-base) / 0.1 |
--warning-flat-hover | Warning flat hover color | var(--warning-base) / 0.25 |
--warning-flat-active | Warning flat active color | var(--warning-base) / 0.35 |
--danger-flat | Danger flat color | var(--danger-base) / 0.1 |
--danger-flat-hover | Danger flat hover color | var(--danger-base) / 0.25 |
--danger-flat-active | Danger flat active color | var(--danger-base) / 0.35 |
--info-flat | Info flat color | var(--info-base) / 0.1 |
--info-flat-hover | Info flat hover color | var(--info-base) / 0.25 |
--info-flat-active | Info flat active color | var(--info-base) / 0.35 |
Variable | Description | Default |
---|---|---|
--radius-sm | Small radius | .25rem |
--radius-md | Medium radius | .5rem |
--radius-lg | Large radius | 1rem |
--radius-full | Full radius | 999px |