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

Badge

A small label for status, counts and highlights like “New”.

import { Badge } from "kivu-ui"

On this page

UsageVariantsTonesEyebrow styleRemovable chipsProps

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 { Badge } from "kivu-ui";

Examples

Variants

SoftSolidOutline
import { Badge } from "kivu-ui";

export default function Demo() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Badge variant="soft">Soft</Badge>
      <Badge variant="solid">Solid</Badge>
      <Badge variant="outline">Outline</Badge>
    </div>
  );
}

Tones

PrimaryNewPaidOverdueArchived
import { Badge } from "kivu-ui";

export default function Demo() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Badge tone="primary">Primary</Badge>
      <Badge tone="accent" variant="solid">New</Badge>
      <Badge tone="success">Paid</Badge>
      <Badge tone="danger">Overdue</Badge>
      <Badge tone="neutral">Archived</Badge>
    </div>
  );
}

Eyebrow style

caps renders an uppercase, letter-spaced label.

Built for small studiosBeta
import { Badge } from "kivu-ui";

export default function Demo() {
  return (
    <div className="flex flex-wrap items-center gap-2">
      <Badge caps>Built for small studios</Badge>
      <Badge caps size="sm" tone="neutral">Beta</Badge>
    </div>
  );
}

Removable chips

Pass onRemove to add a × button, e.g. for active filters.

Status: ActivePlan: GrowthCountry: Rwanda
import { useState } from "react";
import { Badge, Button } from "kivu-ui";

const initial = ["Status: Active", "Plan: Growth", "Country: Rwanda"];

export default function Demo() {
  const [filters, setFilters] = useState(initial);
  return (
    <div className="flex flex-wrap items-center gap-2">
      {filters.map((f) => (
        <Badge key={f} variant="outline" tone="neutral" onRemove={() => setFilters(filters.filter((x) => x !== f))}>
          {f}
        </Badge>
      ))}
      {filters.length === 0 ? (
        <Button size="sm" variant="link" onClick={() => setFilters(initial)}>Reset filters</Button>
      ) : (
        <Button size="sm" variant="ghost" onClick={() => setFilters([])}>Clear all</Button>
      )}
    </div>
  );
}

Props

Badge

Extends <span> attributes.

PropTypeDefaultDescription
variant"solid" | "soft" | "outline""soft"Visual style.
tone"primary" | "accent" | "neutral" | "success" | "danger""primary"Colour family.
size"sm" | "md""md"Controls the size.
capsbooleanfalseUppercase eyebrow style.
leftSectionReactNode-Icon before the text.
onRemove() => void-Adds a × button that calls this.
removeLabelstring"Remove {text}"Accessible name of the × button.

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

PreviousDropdownMenuNextAvatar