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

Toast

Short notices like “Saved” or “Deleted, undo?”. Call toast() from anywhere; render <Toaster /> once.

import { Toaster, toast } from "kivu-ui"

On this page

UsageProps

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

Usage

import { Toaster, toast } from "kivu-ui";
import { Button, Toaster, toast } from "kivu-ui";

export default function Demo() {
  return (
    <div className="flex flex-wrap gap-3">
      <Button variant="soft" onClick={() => toast.success("Invoice sent", { description: "To amara@nyota.co" })}>Success</Button>
      <Button variant="soft" tone="danger" onClick={() => toast.error("Payment failed", { description: "The card was declined." })}>Error</Button>
      <Button
        variant="outline"
        onClick={() => toast({ title: "Deleted 3 projects", action: { label: "Undo", onClick: () => toast.info("Restored 3 projects") } })}
      >
        With undo
      </Button>
      {/* Render once, near the root of your app. */}
      <Toaster position="bottom-right" />
    </div>
  );
}

Props

toast(options)

PropTypeDefaultDescription
titleReactNode-Required. Or pass a string: toast("Saved").
descriptionReactNode-Second line.
tone"neutral" | "success" | "danger" | "info""neutral"Or use toast.success / toast.error / toast.info.
durationnumber-ms before closing. Infinity keeps it open.
action{ label, onClick }-One button, e.g. Undo.
idstring-Update or dedupe an existing toast.

Toaster

PropTypeDefaultDescription
position"top-right" | "top-center" | "bottom-right" | "bottom-center" | "bottom-left""bottom-right"Where toasts appear.
durationnumber5000Default time on screen, in ms.
maxnumber4Most toasts visible at once.

Every component also accepts className and forwards its ref. Root CSS class: .kivu-toast

PreviousEmptyStateNextProgress