How tweakcn and shadcn presets fit together
October 23, 2026 · 5 min read
If you want your Shadcn UI project to stop looking like the default, two options come up quickly: official shadcn presets and themes made with tweakcn. They're often compared as alternatives, but they solve slightly different problems, and they work well together. This guide explains what each one is, where each is stronger, and how to use both in the same project.
Presets in brief
Presets are part of the official shadcn tooling. A code like b5owWMfJ8l stores a full set of design choices that the CLI can install in one go. Decoded, a preset contains:
- style: the component geometry and spacing (Vega, Nova, Maia, Lyra, Mira, Luma, Sera or Rhea)
- baseColor and theme: the neutral palette and the accent color
- chartColor: the five-step chart ramp
- iconLibrary: Lucide, Tabler, Hugeicons, Phosphor or Remix Icon
- font and fontHeading: body and heading fonts
- radius, menuAccent and menuColor
You apply it with the shadcn CLI:
# New project
npx shadcn@latest init --preset <code>
# Existing project
npx shadcn@latest apply --preset <code>
Because a preset covers style and icons as well as colors, it changes how components are built, not just how they're painted. See what is a shadcn preset for a full introduction.
tweakcn in brief
tweakcn is a popular visual theme editor for Shadcn UI. You adjust colors, typography, radius, shadows and other values with live controls and see the result on sample components. When you're happy, you export the theme as CSS variables and add them to your project.
Its strength is freedom. You can pick any color for any token, not just values from a fixed palette, and fine-tune things presets don't touch, such as shadow values. It also has a library of ready-made themes to start from.
The key difference
The simplest way to think about it:
- A preset is a set of choices from the official shadcn options, encoded in a short code and applied by the CLI. It covers the whole setup, including style and icon library.
- A tweakcn theme is a custom set of CSS variables. It covers how things look (colors, fonts, radius, shadows) with arbitrary values, and you paste it into your CSS.
| shadcn preset | tweakcn theme | |
|---|---|---|
| Format | Short code | CSS variables |
| Applied with | shadcn CLI (init / apply) | Copying the exported CSS |
| Colors | Curated base colors and accent themes | Any color for any token |
| Component style (spacing, geometry) | Yes, 8 styles | No, works with your existing components |
| Icon library | Yes | No |
| Fonts | 26 Google Fonts, separate heading font | Configurable |
| Shadows | Not a preset option | Fully adjustable |
| Shareable as | A code or a ui.shadcn.com URL | CSS or a link to the theme |
| Best at | Coherent full setups, fast | Precise, custom color work |
The preset vs theme distinction is covered in more depth in shadcn preset vs theme.
When a preset is the better fit
- You're starting a new project and want a finished look in one command, including the right style and icons.
- You want a cohesive system without design work. Base colors, accents, chart ramps and fonts are designed to fit together, so it's hard to end up with a clashing combination.
- You want to change geometry, not just color. Switching from rounded, spacious Maia to compact, square Lyra is a style change. A color theme can't do that.
- You want something easy to share. A teammate can install it with one command, and
npx shadcn@latest preset url <code>prints a ui.shadcn.com link to view it.
When tweakcn is the better fit
- You have exact brand colors. If your primary has to be a specific hex value, a visual editor that accepts any color is the direct route.
- You want to customize details beyond the preset options, such as shadow depth, specific chart colors or individual token values.
- You already have a project with components you're happy with and just want to restyle the colors.
- You like to design visually, adjusting sliders and seeing changes live.
Using both together
You don't have to choose. A practical workflow:
-
Start with a preset. Pick one that's close to what you want: the right style, fonts, icon library and roughly the right palette. Browse the preset gallery, take the finder quiz, or build one in the preset builder.
-
Install it.
npx shadcn@latest init --preset <code> -
Fine-tune colors in a theme editor. Bring the preset's colors into tweakcn (or any editor), adjust the primary to your exact brand color, tweak shadows, and export the CSS.
-
Paste the updated variables into your global CSS, replacing the preset's values.
To get the preset's CSS variables as a starting point without installing anything, use the preset decoder.
Watch out for re-applying
If you run npx shadcn@latest apply --preset <code> again later, it will overwrite your CSS variables with the preset's values. Use --only font if you only want to change fonts, and keep your custom theme in version control.
This split plays to each tool's strengths. The preset handles structure (style, icons, fonts, radius), and the theme editor handles precise color.
What about previews?
Both approaches benefit from seeing the result on realistic layouts rather than a handful of buttons. Every preset on this site can be previewed on full pages built with shadcnblocks blocks, which ship in every style. That makes it easier to judge how a style and palette hold up across a landing page or dashboard before you start fine-tuning.
FAQ
Is tweakcn official?
No. tweakcn is an independent, community-built tool. Presets are part of the official shadcn CLI and ui.shadcn.com. Both produce standard Shadcn UI CSS variables, so the results are compatible.
Can I convert a tweakcn theme into a preset code?
Not directly. Presets can only encode the built-in options (named base colors, accent themes, fonts and so on), while tweakcn themes can use any value. A custom theme generally has no exact preset equivalent.
Can I apply only the colors from a preset?
Yes. npx shadcn@latest apply --preset <code> --only theme applies the color part of a preset and leaves your style, fonts and icons alone.
Which is better for beginners?
Presets are quicker because there are fewer decisions and one command does everything. tweakcn is great once you know which colors you want to change.