← All works
Open-Source Design System3 min read 6 sections

Chaya UI: A Data-First Component Library

Contributing to Chaya UI, Traboda's open-source React component library: a data-first design system built on TypeScript, Tailwind CSS, and Radix, where my work focused on how the DataTable and Breadcrumb look and behave.

Project
Chaya UI by Traboda, GPL-3.0
Role
Contributor: design and front-end
Stack
React, TypeScript, Tailwind CSS, Radix, Storybook
Contributed
October 2023
  • 50

    Components in the library

  • 8

    Hooks

  • 3

    Merged pull requests

  • 13

    Contributors to the project

Chaya UI: A Data-First Component Library
0106

Overview

Chaya UI is Traboda's open-source component library for React, built so teams can ship SaaS applications with less code. It's documented in Storybook and open-sourced under GPL-3.0, and it's one of the projects where I worked alongside the people who created it, on design as well as code.

Chaya UI's introduction: a modern, data-first component library for React
Chaya UI's introduction: a modern, data-first component library for React

The library was started by Traboda's team in 2022; most of its code is theirs. My merged contributions are focused on two components, the DataTable and the Breadcrumb, described below.

0206

The Philosophy

Chaya's documentation opens with its principles, and they explain most of the design decisions inside it.

PrincipleWhat it means in practice
The best developer experienceLess code downstream, minimal boilerplate, no surprises
Data-first, no compositionsComponents take lists and objects directly, without wrapper components or mapping
The best ingredientsTypeScript, Tailwind CSS, Radix primitives, and class-variance-authority
Maximum flexibilityVariants, props, and theming
Do the heavy liftingAccessibility, responsiveness, and performance built in
Follow the standardNames and props consistent with libraries like Chakra UI and Mantine
Chaya's principles, from its documentation

Data-first is the one that matters most for a component like the DataTable: you hand it your rows and a column definition, and it renders, sorts, and styles them.

0306

What's in the Library

The library covers what a SaaS dashboard needs, with display and input components making up most of it.

50 components and 8 hooks, grouped by type
50 components and 8 hooks, grouped by type
0406

My Contribution: Readable Tables

Data tables are where dashboards live or die. Long rows of similar values are hard to scan, so the DataTable supports striping, and my first pull request reworked how striped rows and columns are coloured so the bands stay visible without fighting the content, including the theme colours in the Tailwind config.

Striped rows: alternate bands guide the eye across a wide row
Striped rows: alternate bands guide the eye across a wide row
Striped columns: the same idea, vertically, for comparing values down a column
Striped columns: the same idea, vertically, for comparing values down a column
Pull requestWhat changed
Fixed the rows and columns colours (#120)Striped row and column colours in the DataTable, its stories, and the Tailwind theme
Changes in the title bar (#121)The DataTable's title bar and row styling
Table colour (#122)The Breadcrumb component and its stories
Merged contributions, October 2023
0506

The Title Bar

A table in a real product rarely stands alone: it needs a title, a search box, and a count. The DataTable's title bar holds those, and my second pull request reworked its layout and how it sits on top of the rows.

The DataTable with its manager: search on the left, the count on the right, then the rows
The DataTable with its manager: search on the left, the count on the right, then the rows
PartJob
Search boxFilter rows without leaving the table
CountTells you how much is there, and how much matches
Column headersSortable, with a quiet sort icon
RowsLinks stay blue; everything else stays neutral
Anatomy of a table with a title bar
0606

What I Took From It

LessonWhy
Small changes in a shared system travel farA row colour in a library shows up in every product that uses it
Stories are the specEach change came with its Storybook stories, so reviewers could see it, not just read it
Follow the system's principlesData-first meant changing styling without changing how people pass in data
Contributing to someone else's design system

The library and its documentation are at chaya.traboda.com, and the code is on GitHub.