Library

uikit

Reusable React components with one consistent look. Inputs, pickers, forms, data views, charts and feedback. Import one component at a time. Theme everything with CSS variables.

Why I built it

Most component libraries are all or nothing. You take their weight and their look. I wanted a small set I can import piece by piece and restyle with CSS variables. It also covers the heavy parts: a kanban board, a calendar, a data list and a form from a schema.

LibrariesDev toolsv0.8.3MITReact 18 or 19Open source
On npm
1 / 5
Features

What it does

01

Calendar

Month, week, day and agenda views. Drag to move or resize an event. Drag across empty time to pick a range.

Calendar.tsx
<EventCalendar
  events={events}
  eventId={(e) => e.id}
  eventStart={(e) => e.start}
  eventEnd={(e) => e.end}
  eventTitle={(e) => e.title}
/>
EventCalendar in week view
02

Data lists

Tabs, search, filters, sorting and paging in one component. Pass a fetch function. It loads one page at a time.

Team.tsx
<ListView
  data={fetchPeople}
  idField="id"
  title="Team"
  columns={[
    { id: 'name', label: 'Name', sortable: true },
    { id: 'email', label: 'Email' },
  ]}
/>
ListView with tabs, filters and search
03

Forms from a schema

Describe the sections and fields. The form lays them out, checks them and returns the values.

schema.ts
const schema: FormSchema = {
  sections: [{
    title: 'Basics',
    columns: 2,
    fields: [
      { name: 'name', type: 'text', label: 'Project name' },
      { name: 'active', type: 'switch', label: 'Active' },
    ],
  }],
}
DynamicForm with two sections
04

Charts

Line, bar and donut charts, progress meters and sparklines. No chart library underneath.

LineChart
BarChart
DonutChart
ProgressMeter
05

Light and dark

Every colour comes from a --uikit-* CSS variable. Set data-theme="dark" on the page for dark mode.

app.css
:root {
  --uikit-color-primary: #0f766e;
}
  • 06

    Import only what you use

    Each component has its own entry point. Its styles load with it. There is no CSS file to import.

How to use

Get started

Read the full docs
  1. 1

    Install

    React 18 or 19.

    $npm i @dinesh-gamage/uikit
  2. 2

    Import a component

    From the main entry, or from its own path.

    import { Input } from '@dinesh-gamage/uikit/input'
    import { DatePicker } from '@dinesh-gamage/uikit/datetime'
  3. 3

    Turn on dark mode

    Set the theme on the html element.

    <html data-theme="dark">