# Theming > Apply a tweakcn theme from the CLI, or customize the CSS variables yourself. Source: https://shellui.dev/docs/v0.4/theming Every ShellUI component is styled with CSS variables (`--background`, `--primary`, `--radius`, …) through Tailwind CSS 4.3.2. Change the variables and every component follows, including charts. ## Apply a theme from tweakcn The 0.3 CLI fetches a public [tweakcn](https://tweakcn.com) theme by URL or theme ID and writes its variables into your project. ### 1. Pick a theme Design or choose a theme on [tweakcn.com](https://tweakcn.com) and copy its URL. ### 2. Apply it ```bash shellui theme apply ``` This writes the variables to `wwwroot/input.css`. To keep them in a separate file instead, pass `--emit-override wwwroot/theme.css` and link that file after the ShellUI stylesheet. ### 3. Keep it in sync ```bash shellui theme update ``` Re-fetches the theme recorded in `shellui.theme.lock`. Run it from the project root. Starting a new project? `shellui theme init ` runs `shellui init` and applies the theme in one step. It accepts the same options as `init`, such as `--tailwind standalone|npm` and `--yes`. ## Customize the variables You can also edit the variables directly in `wwwroot/input.css`: ```css @import "tailwindcss"; :root { --background: oklch(0.99 0 0); --foreground: oklch(0 0 0); --primary: oklch(0 0 0); --primary-foreground: oklch(1 0 0); --secondary: oklch(0.94 0 0); --secondary-foreground: oklch(0 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.44 0 0); --accent: oklch(0.94 0 0); --accent-foreground: oklch(0 0 0); --destructive: oklch(0.63 0.19 23.03); --destructive-foreground: oklch(1 0 0); --border: oklch(0.92 0 0); --input: oklch(0.94 0 0); --ring: oklch(0 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0 0 0); --radius: 0.5rem; color-scheme: light; } ``` With the NuGet package, put your overrides in a stylesheet linked **after** `_content/ShellUI.Components/shellui-theme.css` so they win. ## Dark mode Dark mode is class-based: the `dark` class on `` switches to the `.dark` variables. `shellui init` adds a script to `App.razor` that applies the saved theme before Blazor starts, so the page doesn't flash. ```css .dark { --background: oklch(0 0 0); --foreground: oklch(1 0 0); --primary: oklch(1 0 0); --primary-foreground: oklch(0 0 0); --card: oklch(0.14 0 0); --card-foreground: oklch(1 0 0); --border: oklch(0.26 0 0); color-scheme: dark; /* …the rest of the variables */ } ``` `color-scheme` tells the browser to draw its own controls (the date picker calendar, number spinners, scrollbars, autofill, `