Tokens
The colours, radii and type scale every SwipeUI item is styled with.
SwipeUI items never use raw colours or arbitrary sizes. They use tokens: CSS variables in your global.css, which Uniwind turns into class names such as bg-primary, rounded-md and text-headline. Change a token and every item follows. In CI, an audit rejects any item that uses a raw colour or a value off these scales.
Colours
The names follow shadcn's, which React Native Reusables and AI agents already know, plus a few SwipeUI additions. Each is a --color-<name> variable and a colour class (bg-, text-, border-).
| Token | Used for |
|---|---|
background, foreground | Screen background and text |
card, card-foreground | Raised surfaces |
popover, popover-foreground | Menus and sheets |
primary, primary-foreground | Main actions |
secondary, secondary-foreground | Secondary actions |
muted, muted-foreground | Subtle backgrounds and secondary text |
accent, accent-foreground | Highlights |
destructive, destructive-foreground | Destructive actions |
border, input, ring | Borders, input borders and switch tracks, focus rings |
surface, surface-elevated | Navigation surfaces such as tab bars and drawers |
glass-tint | The optional tint over Liquid Glass (tinted) |
tab-active, tab-inactive | Tab bar icon and label states |
Radii
| Class | Default |
|---|---|
rounded-sm | 6 |
rounded-md | 10 |
rounded-lg | 14 |
rounded-xl | 20 |
rounded-full | 9999 |
Spacing uses Tailwind's default scale.
Type scale
The iOS text styles at their default Dynamic Type size. The sizes scale with the user's text size setting.
| Class | Size (pt) | Weight |
|---|---|---|
text-large-title | 34 | Regular |
text-title-1 | 28 | Regular |
text-title-2 | 22 | Regular |
text-title-3 | 20 | Regular |
text-headline | 17 | Semibold |
text-body | 17 | Regular |
text-callout | 16 | Regular |
text-subheadline | 15 | Regular |
text-footnote | 13 | Regular |
text-caption-1 | 12 | Regular |
text-caption-2 | 11 | Regular |
Use them through the Text component's variant. Merge classes with cn, which knows these are sizes, not colours.
In code
For places a class can't reach, such as Reanimated styles or an icon's colour prop, the tokens item has the names and scales as TypeScript values. Read a colour with Uniwind's useCSSVariable:
import { useCSSVariable } from 'uniwind';
import { colorVariable } from '@/components/swipeui/lib/tokens';
const tint = useCSSVariable(colorVariable('tab-active'));