v0.1.0
Get startedComponentsTheming
Install

Getting started

  • Introduction
  • Installation
  • Tailwind CSS
  • Next.js

Theming

  • Design tokens
  • Dark mode
  • Customization

Layout

  • SectionHeader
  • Container & Divider
  • AppShell
  • PageHeader

Actions

  • Button
  • IconButton

Forms

  • Input
  • Textarea
  • Select
  • Checkbox
  • Switch
  • SegmentedControl
  • RadioGroup
  • Combobox
  • DatePicker & DateRangePicker

Disclosure

  • Tabs
  • Accordion

Overlay

  • Modal
  • Drawer
  • Tooltip
  • Popover
  • DropdownMenu

Data display

  • Badge
  • Avatar
  • Card
  • StatCard
  • Table & DataTable
  • Pagination
  • Sparkline & chart colours

Feedback

  • Banner
  • Spinner
  • Skeleton
  • EmptyState
  • Toast
  • Progress

A lightweight, Tailwind-friendly React component library.

Getting started

  • Introduction
  • Installation
  • Tailwind CSS
  • Next.js

Theming

  • Design tokens
  • Dark mode
  • Customization

Components

  • SectionHeader
  • Container & Divider
  • AppShell
  • PageHeader
  • Button
  • IconButton
  • Input

Released under the MIT License.kivu-ui on npm

Documentation

Getting started

  • Introduction
  • Installation
  • Tailwind CSS
  • Next.js

Theming

  • Design tokens
  • Dark mode
  • Customization

Layout

  • SectionHeader
  • Container & Divider
  • AppShell
  • PageHeader

Actions

  • Button
  • IconButton

Forms

  • Input
  • Textarea
  • Select
  • Checkbox
  • Switch
  • SegmentedControl
  • RadioGroup
  • Combobox
  • DatePicker & DateRangePicker

Disclosure

  • Tabs
  • Accordion

Overlay

  • Modal
  • Drawer
  • Tooltip
  • Popover
  • DropdownMenu

Data display

  • Badge
  • Avatar
  • Card
  • StatCard
  • Table & DataTable
  • Pagination
  • Sparkline & chart colours

Feedback

  • Banner
  • Spinner
  • Skeleton
  • EmptyState
  • Toast
  • Progress

Customization

className, tokens, component classes, wrappers and asChild.

On this page

classNameTokensComponent classesWrappingasChild

Getting started

  • Introduction
  • Installation
  • Tailwind CSS
  • Next.js

Theming

  • Design tokens
  • Dark mode
  • Customization

Layout

  • SectionHeader
  • Container & Divider
  • AppShell
  • PageHeader

Actions

  • Button
  • IconButton

Forms

  • Input
  • Textarea
  • Select
  • Checkbox
  • Switch
  • SegmentedControl
  • RadioGroup
  • Combobox
  • DatePicker & DateRangePicker

Disclosure

  • Tabs
  • Accordion

Overlay

  • Modal
  • Drawer
  • Tooltip
  • Popover
  • DropdownMenu

Data display

  • Badge
  • Avatar
  • Card
  • StatCard
  • Table & DataTable
  • Pagination
  • Sparkline & chart colours

Feedback

  • Banner
  • Spinner
  • Skeleton
  • EmptyState
  • Toast
  • Progress

There are four ways to customise Kivu UI. Start with the lightest one that does the job.

1. className

Every component forwards className. Tailwind utilities or your own classes override the defaults.

<Card className="border-2 border-primary-200 p-10">…</Card>

2. Tokens

Change a CSS variable to restyle every component that uses it.

:root { --kivu-radius-md: 999px; } /* pill buttons everywhere */

3. Targeting component classes

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; }

4. Wrap components

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} />;
}

Polymorphism with asChild

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>
PreviousDark modeNextSectionHeader