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

Drawer

A side panel for record details, edit forms and filters. Built on native <dialog>, like Modal.

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

Edit customer

Changes are saved to the CRM.

import { useState } from "react";
import { Button, Drawer, Input, Select } from "@kivu-ui/react";

export default function Demo() {
  const [open, setOpen] = useState(false);
  return (
    <>
      <Button variant="outline" onClick={() => setOpen(true)}>Edit customer</Button>
      <Drawer
        open={open}
        onClose={() => setOpen(false)}
        title="Edit customer"
        description="Changes are saved to the CRM."
        footer={
          <>
            <Button variant="ghost" onClick={() => setOpen(false)}>Cancel</Button>
            <Button onClick={() => setOpen(false)}>Save</Button>
          </>
        }
      >
        <div className="grid gap-4">
          <Input label="Company" defaultValue="Nyota Coffee" />
          <Input label="Contact email" type="email" defaultValue="amara@nyota.co" />
          <Select label="Plan" options={["Starter", "Growth", "Enterprise"]} defaultValue="Growth" />
        </div>
      </Drawer>
    </>
  );
}

Props

Drawer

Extends <dialog> attributes.

PropTypeDefaultDescription
openboolean-Required. Whether the drawer is shown.
onClose() => void-Required. Called on Escape, backdrop click or the × button.
side"left" | "right""right"Edge it slides in from.
size"sm" | "md" | "lg""md"Controls the size.
titleReactNode-Heading; becomes the accessible name.
descriptionReactNode-Text under the title.
footerReactNode-Sticky footer, e.g. Save and Cancel.
closeOnBackdropbooleantrueClose when clicking outside the panel.
hideCloseButtonbooleanfalseHide the × button.
barebooleanfalseRemove the body padding.

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

PreviousModalNextTooltip