sigil/UI

Installation

Add Sigil UI to a new or existing project in under two minutes.

Packages

Packagenpm
@sigil-ui/tokensTokens, CSS variables, Tailwind v4
@sigil-ui/components350+ styled React components
@sigil-ui/presets44 curated preset bundles
@sigil-ui/primitivesHeadless behavior primitives
@sigil-ui/cliCLI tools
create-sigil-appProject scaffolder

Requirements

  • React 18+ or 19
  • Tailwind CSS v4
  • Node.js 18+

Package manager

# pnpm (recommended)
pnpm add @sigil-ui/tokens @sigil-ui/components

# npm
npm install @sigil-ui/tokens @sigil-ui/components

# yarn
yarn add @sigil-ui/tokens @sigil-ui/components

# bun
bun add @sigil-ui/tokens @sigil-ui/components

Scaffold with the CLI

The fastest way to start is the init command. It creates a token file, wires up CSS imports, and optionally applies a preset.

npx @sigil-ui/cli init

Options:

# Start with a preset
npx @sigil-ui/cli init --preset sigil
npx @sigil-ui/cli init --preset anvil

# Specify output directory
cd apps/web
npx @sigil-ui/cli init

Manual setup

1. Import token CSS

Add the Sigil token stylesheet to your root layout or entry point. This injects all --s-* CSS custom properties.

app/layout.tsx
import "@sigil-ui/tokens/css";

Or if you are using Tailwind v4, import the Tailwind-compatible layer instead:

app/globals.css
@import "tailwindcss";
@import "@sigil-ui/tokens/tailwind";

2. Use components

Every component reads from the CSS variables injected by the token stylesheet. No additional configuration needed.

app/page.tsx
import { Button } from "@sigil-ui/components";
import { Stack } from "@sigil-ui/components";

export default function Page() {
  return (
    <Stack gap={16} align="center">
      <h1>Welcome</h1>
      <Button variant="primary">Continue</Button>
      <Button variant="ghost">Skip</Button>
    </Stack>
  );
}

3. Customize tokens (optional)

Override any token by redefining CSS variables. You can do this in a global stylesheet or scoped to a container.

app/globals.css
:root {
  --s-primary: oklch(0.55 0.20 145);
  --s-card-radius: 16px;
}

Or switch to a full preset with the CLI:

npx @sigil-ui/cli preset anvil
npx @sigil-ui/cli doctor

Framework guides

Next.js (App Router)

app/layout.tsx
import "@sigil-ui/tokens/css";
import type { ReactNode } from "react";

export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  );
}

Vite + React

src/main.tsx
import "@sigil-ui/tokens/css";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App";

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <App />
  </StrictMode>,
);

Remix

app/root.tsx
import "@sigil-ui/tokens/css";
import { Links, Meta, Outlet, Scripts } from "@remix-run/react";

export default function App() {
  return (
    <html lang="en">
      <head>
        <Meta />
        <Links />
      </head>
      <body>
        <Outlet />
        <Scripts />
      </body>
    </html>
  );
}

TypeScript

All components ship with full TypeScript definitions. The token types are exported from @sigil-ui/tokens:

import type { SigilTokens, SigilPreset } from "@sigil-ui/tokens";
Studiodefault
Presets
primary
secondary
background
surface
text
border
accent
success
warning
error
info
display
body
mono
heading wt
600
heading trk
-0.025em
base size
16px
page margin
24px
section pad
64px
card pad
24px
grid gap
24px
stack gap
12px
global
8px
button
8px
card
12px
input
6px
border w
1px
style
card border
card shadow
btn shadow
glow
spring
Type
Duration
0.20
Bounce
1.00
easing
cubic-bezier(0.16, 1, 0.3, 1)
fast
150ms
normal
200ms
slow
300ms
hover scale
1.02
press scale
0.98
hover lift
-1px
stagger
50ms
weight
transform
hover
active scale
0.98
min-width
0px
letter sp
0.000em
icon gap
8px
shadow
hover
border
shadow
padding
24px
title size
1px
title wt
desc size
0.875px
aspect
outline
height
36px
focus ring
2px
focus ring
h1 size
2.25px
h2 size
1.875px
h3 size
1.5px
h4 size
1.25px
weight
tracking
-0.020em
leading
1.20
pattern
pattern α
0.03
noise
gradient
grad angle
180°
height
50px
blur
12px
border
padding
24px
item gap
24px
min-height
600px
padding Y
80px
content-max
680px
layout
title size
56px
desc size
18px
padding Y
64px
max-width
600px
layout
title size
36px
padding Y
48px
columns
4
gap
36px
content-max
1200px
rail-gap
24px
grid-cell
50px
cross-stroke
1.5px
navbar-h
50px
bento-gap
16px
grid lines
dots
cell borders
cell bg
Gutter
Margin
content
hero
navbar
rail visible
enabled