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

Card

A surface for grouping content: elevated, outlined, glass or brand.

import { Card } from "@kivu-ui/react"

On this page

UsageVariantsGlassInteractiveProps

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

Examples

Variants

Elevated
Outline
Subtle
Brand
import { Card } from "@kivu-ui/react";

export default function Demo() {
  return (
    <div className="grid w-full gap-4 sm:grid-cols-2 lg:grid-cols-4">
      <Card variant="elevated">Elevated</Card>
      <Card variant="outline">Outline</Card>
      <Card variant="subtle">Subtle</Card>
      <Card variant="brand">Brand</Card>
    </div>
  );
}

Glass

Frosted panel for photos and gradients.

Hours tracked this month

142.5 h

import { Card } from "@kivu-ui/react";

export default function Demo() {
  return (
    <div className="w-full rounded-kivu-xl bg-gradient-to-br from-primary-400 to-primary-700 p-8">
      <Card variant="glass" padding="lg" className="max-w-sm">
        <p className="text-sm text-white/80">Hours tracked this month</p>
        <p className="font-display text-3xl">142.5 h</p>
      </Card>
    </div>
  );
}

Interactive

Hover lift plus asChild to make the whole card a link.

Brand refresh12 tasks · due Friday›Website launch31 tasks · 3 members›
import { Card } from "@kivu-ui/react";

const projects = [
  { name: "Brand refresh", meta: "12 tasks · due Friday" },
  { name: "Website launch", meta: "31 tasks · 3 members" },
];

export default function Demo() {
  return (
    <div className="grid w-full gap-4 sm:grid-cols-2">
      {projects.map((p) => (
        <Card key={p.name} interactive asChild>
          <a href="#interactive" className="flex items-center justify-between">
            <span>
              <span className="block text-lg">{p.name}</span>
              <span className="text-sm text-fg-subtle">{p.meta}</span>
            </span>
            <span aria-hidden>›</span>
          </a>
        </Card>
      ))}
    </div>
  );
}

Props

Card

Extends <div> attributes.

PropTypeDefaultDescription
variant"elevated" | "outline" | "subtle" | "glass" | "brand""elevated"Visual style.
padding"none" | "sm" | "md" | "lg""md"Inner spacing.
radius"md" | "lg" | "xl""lg"Corner radius.
interactivebooleanfalseHover lift and pointer cursor.
asChildbooleanfalseRender the single child (e.g. a router Link) with this card's styles and behaviour.

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

PreviousAvatarNextStatCard