className, tokens, component classes, wrappers and asChild.
On this page
There are four ways to customise Kivu UI. Start with the lightest one that does the job.
Every component forwards className. Tailwind utilities or your own classes override the defaults.
<Card className="border-2 border-primary-200 p-10">…</Card>Change a CSS variable to restyle every component that uses it.
:root { --kivu-radius-md: 999px; } /* pill buttons everywhere */Components use stable kivu- class names (BEM-style), for example .kivu-btn, .kivu-btn--soft and .kivu-field__control. Your unlayered CSS beats the library's layer:
.kivu-btn { letter-spacing: 0.02em; }
.kivu-tabs__trigger[data-state="active"] { font-weight: 600; }Bake your defaults into your own component:
import { Button, type ButtonProps } from "kivu-ui";
export function CtaButton(props: ButtonProps) {
return <Button size="lg" className="rounded-full" {...props} />;
}Button, Card and Container accept asChild. They render your child element with their classes, props and ref merged in. Event handlers on both run.
<Card asChild interactive>
<a href="/projects">Projects</a>
</Card>