Getting Started
Theming
trink-ui uses CSS custom properties for all colors, spacing, and typography. Override any variable to match your brand.
How it works
Every trink-ui component references CSS variables like rgb(var(--trinkui-primary)) instead of hardcoded colors. You define these variables in your global CSS, and all components automatically pick them up. The values use the RGB channel format (e.g. 99 102 241) so they work with Tailwind's opacity utilities.
Color Variables
Background
--trinkui-bg
L: 255 255 255
D: 9 9 11
Foreground
--trinkui-fg
L: 10 10 10
D: 250 250 250
Primary
--trinkui-primary
L: 99 102 241
D: 129 140 248
Primary Foreground
--trinkui-primary-fg
L: 255 255 255
D: 255 255 255
Secondary
--trinkui-secondary
L: 241 245 249
D: 24 24 27
Accent
--trinkui-accent
L: 249 115 22
D: 251 146 60
Muted
--trinkui-muted
L: 100 116 139
D: 113 113 122
Border
--trinkui-border
L: 226 232 240
D: 39 39 42
Surface
--trinkui-surface
L: 248 250 252
D: 18 18 21
Custom Brand Colors
Override the primary color to match your brand. All components will automatically update:
:root {
/* Override just the primary color */
--trinkui-primary: 20 184 166; /* teal-500 */
--trinkui-primary-fg: 255 255 255;
}
.dark {
--trinkui-primary: 45 212 191; /* teal-400 */
}Typography
Customize heading, body, and monospace fonts:
:root {
--trinkui-font-heading: "Cal Sans", "Inter", sans-serif;
--trinkui-font-body: "Inter", sans-serif;
--trinkui-font-mono: "JetBrains Mono", monospace;
}Border Radius
Control the roundness of all components:
--trinkui-radius-sm
6px
--trinkui-radius-md
12px
--trinkui-radius-lg
16px
--trinkui-radius-xl
24px
--trinkui-radius-full
pill
Shadows
:root {
--trinkui-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--trinkui-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
--trinkui-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}Per-Section Theming
Every section component accepts a theme prop to switch between light and dark within the same page:
<HeroCentered theme="dark" title="Dark hero" ... />
<FeaturesGrid theme="light" title="Light features" ... />
<CTACentered theme="dark" title="Dark CTA" ... />