Skip to main content

Installation

You can install presets in two ways:

Install the Presets Package

The @theme-ui/presets package includes all available presets:
Then import the preset you want to use:

Install Individual Preset Packages

You can also install individual preset packages to reduce bundle size:
Then import the preset:

Basic Usage

To use a preset, spread it into your theme configuration:
That’s it! Your application will now use the Funk preset’s colors, typography, and styles.

Customizing Presets

Presets are designed to be customized. You can override any part of a preset to match your design requirements.

Override Specific Values

You can override individual values while keeping the rest of the preset:

Override Fonts

Change the font families while keeping other preset values:

Add Custom Styles

Extend the preset’s styles with your own:

Add Custom Variants

Add your own component variants while keeping preset styles:

Extending Presets

You can build on top of presets by importing them in your own preset files.

Extend from Base

Many Theme UI presets extend from the base preset:

Merge Multiple Presets

You can combine values from multiple presets using deepmerge or object spreading:
The merge function from Theme UI performs a deep merge of theme objects, which is useful when combining presets.

Create a Custom Preset

You can create your own reusable preset:
Then use your custom preset:

Color Modes with Presets

Some presets like system include built-in color modes. You can also add color modes to any preset:
Learn more about color modes.

Best Practices

Start with a Preset

Using a preset is a great way to get started quickly. Choose one that closely matches your design aesthetic:
  • For a minimal starting point: use base
  • For dark themes: use dark or deep
  • For comprehensive design systems: use tailwind or bootstrap
  • For unique aesthetics: try funk, swiss, or sketchy

Customize Gradually

Don’t override everything at once. Start with the preset and gradually customize:
  1. Use the preset as-is initially
  2. Adjust colors to match your brand
  3. Customize typography if needed
  4. Add custom component variants
  5. Fine-tune spacing and sizing

Keep Your Overrides Organized

Organize your theme customizations in a logical structure:

Use TypeScript

For better autocompletion and type safety, use TypeScript:

Examples

Minimal Customization

Just change the colors:

Extensive Customization

Override multiple aspects:

Combining Preset Features

Mix colors from one preset with styles from another:

Next Steps

Presets Overview

Explore all available presets

Theming

Learn about the theme specification

Color Modes

Add dark mode and color modes

Components

Build UI with Theme UI components