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

Next.js

Use Kivu UI with the App Router, Server Components and next/font.

On this page

SetupServer ComponentsLinks

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

Kivu UI works with the Next.js App Router out of the box. The bundle is marked "use client", so you can render components directly from Server Components.

Setup

Terminal
npm install kivu-ui
app/globals.css
@import "tailwindcss";
@import "kivu-ui/styles.css";
@import "kivu-ui/tailwind.css";
app/layout.tsx
import { Martel_Sans } from "next/font/google";
import "./globals.css";

const martel = Martel_Sans({ subsets: ["latin"], weight: ["400", "600", "700"], variable: "--font-martel" });

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" className={martel.variable}>
      <body>{children}</body>
    </html>
  );
}

Point the tokens at the font variables:

app/globals.css
:root {
  --kivu-font-display: var(--font-martel);
  --kivu-font-body: var(--font-martel);
}

Server Components

Static components render fine in a Server Component:

app/page.tsx
import { Button, SectionHeader } from "kivu-ui";

export default function Page() {
  return <SectionHeader title="Welcome" actions={<Button>Start</Button>} />;
}

Anything with state or event handlers (opening a Modal, a controlled Tabs) belongs in a file marked "use client", like any other React code.

Links

Use asChild to give Next.js Link button styles:

import Link from "next/link";
import { Button } from "kivu-ui";

<Button asChild>
  <Link href="/projects/new">New project</Link>
</Button>
PreviousTailwind CSSNextDesign tokens