Get Started
<Support />
Advanced
You can make the widget feel like part of your product without replacing any components.
Use this when
- the default widget shape is good and you mainly need branding
- you want a copy-paste way to set colors and radius
- you want the widget to follow your app theme or force light or dark mode
Smallest working change
Set the widget tokens once and keep the default UI.
.cossistant {
--co-theme-primary: #111827;
--co-theme-primary-foreground: #ffffff;
--co-theme-background: #ffffff;
--co-theme-foreground: #111827;
--co-theme-border: #e5e7eb;
--co-theme-radius: 0px;
}That is usually enough to make the widget feel like yours.
Common variants
Force light or dark mode
import { Support } from "@cossistant/react";
<Support theme="dark" />;By default, the widget follows your app theme. It checks for .dark or data-color-scheme="dark" on parent elements.
Reuse your shadcn tokens
:root {
--co-theme-background: var(--background);
--co-theme-foreground: var(--foreground);
--co-theme-primary: var(--primary);
--co-theme-primary-foreground: var(--primary-foreground);
--co-theme-border: var(--border);
--co-theme-radius: var(--radius);
}This keeps the widget aligned with the rest of your app instead of inventing a second theme.
When to stop here
- colors, radius, and dark mode are enough
- you want the default layout to stay in place
- you do not need custom pages or a custom shell
Next step
- Pages & Layouts when you need a different first screen, an inline embed, or your own shell
- Copy & Locale when the next change is wording instead of UI
Core token reference
| Variable | Light preview | Default (Light) | Dark preview | Default (Dark) |
|---|---|---|---|---|
--co-theme-background | oklch(99% 0 0) | oklch(15.5% 0 0) | ||
--co-theme-foreground | oklch(20.5% 0 0) | oklch(95% 0 0) | ||
--co-theme-primary | oklch(14.5% 0 0) | oklch(98.5% 0 0) | ||
--co-theme-primary-foreground | oklch(98.5% 0 0) | oklch(14.5% 0 0) | ||
--co-theme-border | oklch(92.2% 0 0) | oklch(26.9% 0 0) | ||
--co-theme-muted | Color-mixed | Color-mixed | ||
--co-theme-muted-foreground | Color-mixed | Color-mixed | ||
--co-theme-radius | - | 0.375rem | - | 0.375rem |
Extra tokens
Use these when the core tokens are not enough:
Status colors
| Variable | Light preview | Default (Light) | Dark preview | Default (Dark) |
|---|---|---|---|---|
--co-theme-destructive | oklch(57.7% 0.245 27.325) | oklch(39.6% 0.141 25.723) | ||
--co-theme-success | oklch(71.7% 0.18 142) | oklch(60% 0.15 142) | ||
--co-theme-warning | oklch(86.4% 0.144 99) | oklch(90.3% 0.111 99) | ||
--co-theme-neutral | oklch(60.8% 0 0) | oklch(50% 0 0) |
Avatar accents
| Variable | Light preview | Default (Light) | Dark preview | Default (Dark) |
|---|---|---|---|---|
--co-theme-pink | oklch(76.3% 0.152 354) | oklch(84.2% 0.109 354) | ||
--co-theme-yellow | oklch(86.4% 0.144 99) | oklch(90.3% 0.111 99) | ||
--co-theme-blue | oklch(72.5% 0.132 241) | oklch(79.8% 0.089 241) | ||
--co-theme-orange | oklch(74.5% 0.166 50) | oklch(68.2% 0.194 50) |
Background shades
| Variable | Light preview | Default (Light) | Dark preview | Default (Dark) |
|---|---|---|---|---|
--co-theme-background-50 | Color-mixed | Color-mixed | ||
--co-theme-background-100 | Color-mixed | Color-mixed | ||
--co-theme-background-200 | Color-mixed | Color-mixed | ||
--co-theme-background-300 | Color-mixed | Color-mixed |
The background shades are derived from your base colors with color-mix() unless you override them directly.