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/react 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

StatCard

A KPI tile: label, big number, change since last period and an optional small chart.

import { StatCard, Sparkline } from "@kivu-ui/react"

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 { StatCard, Sparkline } from "@kivu-ui/react";

Revenue

$48,120

Up +12.5%vs last month

Avg. response time

1.8 h

Down −14%vs last week

Active users

import { Sparkline, StatCard } from "@kivu-ui/react";

export default function Demo() {
  return (
    <div className="grid w-full gap-4 sm:grid-cols-3">
      <StatCard
        label="Revenue"
        value="$48,120"
        delta={12.5}
        deltaLabel="vs last month"
        chart={<Sparkline data={[31, 34, 33, 38, 41, 40, 44, 48]} label="Revenue, last 8 months: up from $31k to $48k" />}
      />
      <StatCard
        label="Avg. response time"
        value="1.8 h"
        delta={-14}
        invertTrend
        deltaLabel="vs last week"
        chart={<Sparkline variant="bar" data={[2.6, 2.4, 2.5, 2.1, 2.0, 1.9, 1.8]} color="var(--kivu-chart-3)" label="Response time, last 7 days" />}
      />
      <StatCard label="Active users" value="3,204" loading />
    </div>
  );
}

Props

StatCard

Extends <div> attributes.

PropTypeDefaultDescription
labelReactNode-Required. What's being measured.
valueReactNode-Required. The number, already formatted.
deltanumber | ReactNode-Change since last period. A number shows as a signed percentage.
trend"up" | "down" | "neutral"-Direction. Inferred from a number delta.
invertTrendbooleanfalseDown is good: swaps green and red.
deltaLabelReactNode-Text after the delta, e.g. “vs last week”.
iconReactNode-Small icon in the top-right corner.
chartReactNode-Content under the numbers, usually a Sparkline or Progress.
variant"elevated" | "outline" | "subtle""outline"Visual style.
loadingbooleanfalseShow skeletons instead of the numbers.

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

PreviousCardNextTable & DataTable