Skip to content

Styling

Guide to styling components with the color system.

Overview

Shark UI’s styling system is built for clarity and consistent theming. It follows shadcn/ui theme tokens and adds three extra tokens: success, warning, and info to cover status states.

CSS Configuration

See Installation for installing with CLI. To add the theme yourself, paste the following into globals.css:

globals.css

Token convention

Each color has two tokens: the base name is the fill. The same name with -foreground is the text and icon color meant to sit on that fill. Use both together on every new surface so content stays readable.

Adding new tokens

New variables must be wired through @theme inline as --color-* entries. See Tailwind CSS

globals.css

Customizing colors

Override variables on :root and .dark. Always update foreground when you change a fill.

globals.css

Radius Scale

--radius is the base radius token for your theme.

We derive a small radius scale from it so components can use consistent corner sizes while still sharing a single source of truth.

app/globals.css

This means:

  • radius-lg is the base value.
  • Smaller radius scale down from --radius.
  • Larger radius scale up from --radius.
  • Changing --radius updates the entire radius scale.

Color system

See Colors for the full token reference, and naming rules.