CSS Theme Previewer
Edit your CSS theme and see it applied to shadcn/ui components as you type.
This tool shows how your CSS theme looks on UI components. Paste your globals.css with its CSS variables and see the result on buttons, cards, form fields and more. Use it for shadcn/ui themes or any design system built on CSS variables.
The previewer parses your CSS variables and applies them to sample components in an isolated preview. It supports these variable names:
--color-primary, --color-secondary
--color-background, --color-foreground
--color-muted, --color-accent
--color-destructive, --color-border
--radius
Syntax highlighting
Edit CSS with syntax highlighting and autocompletion
Live preview
The preview updates as you edit the CSS
Light and dark mode
Switch the preview between light and dark to test both
Sample components
Buttons, cards, form fields, badges, alerts, tables and more
How do I preview my theme?
Paste your CSS variables, from a :root block or a whole CSS file. The preview updates as you type.
What components are included?
Buttons, a card, form fields, badges, alerts, tabs, progress bars, avatars, a table, a dialog, skeleton loaders and a swatch of each theme color.
Can I copy the theme code?
Yes. The copy button copies the CSS from the editor, so you can paste it back into your project.
What CSS variables are supported?
The standard shadcn/ui theme variables, such as background, foreground, primary, secondary, accent, muted, destructive, border and radius. Both --primary and --color-primary naming work.
Does this work with Tailwind CSS?
Yes. You can paste a Tailwind CSS @theme block, and the tool treats it like a :root block of CSS variables.
Private by default
The tool processes CSS in your browser. It never uploads your theme code to a server.
Related tools
JSON Formatter
Format JSON online in your browser. Paste or upload JSON to tidy it with 2 or 4 space indents, find syntax errors, minify it or browse it as a collapsible tree.
JavaScript to JSON
Convert JavaScript object literals to valid JSON
JSON Merge
Merge two JSON objects online with a deep or shallow strategy and choose how arrays combine. Useful for config files and API responses. Free, no signup.