Get started
Overview
Kanso UI is Kanso in code. Kanso is the design language of Kanso Labs: ink on paper, one colour per product, and nothing on a screen that does not carry meaning. The name is the Japanese 簡素, the elimination of clutter. Kanso UI carries it as two libraries with the same names and props, kanso-ui for React and react-native-kanso-ui for React Native, both built from kanso-ui-core's tokens. Behaviour comes from React Aria Components, so keyboard, focus, screen-reader and right-to-left support are built in. Every colour pair meets WCAG 2.2 AA in light and in dark.
The tokens are Kanso's today. The components move to Kanso's look family by family, actions first, and until its own release a family keeps the look it has now. The sections after this one say, where it matters, what is built and what is coming.
Principles
When two of these pull apart, the earlier one wins. The Principles section has the reasons and examples.
- One thing at a time. What needs the person now gets the product colour and the big action, in one spotlight card. Everything else stays in ink and paper.
- Shape is the type, fill is the state. A circle, a pill, a diamond and a square stand for a product's four kinds of thing. Filled is done, outlined is next,
cautionis late,accentis now. A word always goes with them. - The number is the hero. The one figure that matters is set large in the voice face. Every other amount, time and count is set in Roboto Mono, aligned, with its sign.
- Calm in colour, expressive in form. Surfaces sit in layers with soft shadows instead of borders and ornament, and colour appears only when it means something. The energy is in shape and motion, as Material 3 Expressive has it: controls change shape as they are pressed and selected, groups give way, things move on springs. Sizes stay at a human scale.
- Accessible by construction. Every colour pair starts from a contrast target, in both themes: 4.5:1 for text, 3:1 for control boundaries, marks and the focus ring. Touch targets are 48px on phones.
Voice
- Write plainly and concretely. Say what happened and what to do next, and address the person as "you".
- Use sentence case for every title, label, heading, button and menu item: "Save changes", never "Save Changes".
- Write actions as imperatives that name the outcome: "Save changes", "Add item", "Skip". Never "OK", "Submit" or "Click here".
- Lead with the state, then the detail: "Late · 1 h 32 past due", "Saved · 14:32".
- No exclamation marks, no emoji, no hedging ("might", "please try to", "please wait"), no jargon or component names in copy a person reads, and no blame in errors: "Couldn't save the file. Check your connection and try again."
- Write numbers the way the person's locale does, with the real minus sign (−) in amounts. Wrap the app in
I18nProviderand the components write every name, number and date in that locale. - Placeholder copy in this system names the slot it fills:
Headline,Supporting line,Label,First item,Second item,Third item. People areAda LovelaceandGrace Hopper. Numbers that only show a typographic property are01,02,03. The Writing section has the full voice, with the patterns a product writes in.
| Say | Don't say |
|---|---|
| Ada paid you 24.00 | Balance: +24.00 EUR |
| 1 h 32 late | Overdue!!! |
| Delete this item? | Are you sure? |
| No items yet. Add the first one and it shows here. | Nothing here 😢 |
Colour
- Paint every page
kui-color-paper. Lift cards, sheets, dialogs and menus tokui-color-kanso-surfacewith a shadow. Usekui-color-surface-sunkenfor recessed fills (the search field, a segmented control's track) andkui-color-containerfor tonal fills (the tonal button, a meter's track, a neutral avatar). - Set text in
kui-color-ink; secondary text, captions and inactive icons inkui-color-ink-muted. Both read on paper, surface, surface-sunken and container in both themes; the ratios are in each token's note. - Spend the product colour,
kui-color-accent, only on the one highlighted action per screen, the now marker, meter fills, selection bars, links and the focus ring. Text on it iskui-color-on-accent, never a literal white. - Use ink for structure and selection: the strong button, the FAB, a checked box, a switch that is on, a selected chip, the active navigation pill, the selected tab's indicator.
- Keep status apart from the accent:
kui-color-positive(done, money coming in),kui-color-caution(late, needs attention),kui-color-negative(losses and debts that need action) andkui-color-critical(validation errors and destructive actions only). Each has a-softfill with itson-…-softtext. None ever stands alone: add a word, an icon or a sign. - Borders of controls are
kui-color-outline; hairlines between rows arekui-color-divider, which is never the only boundary of a control. - Dark is the same roles at other tones, never an inversion. The base accent in dark is light ink, so the text on it is dark.
The components read Material Design's colour role names, and in kanso-ui-core every one of them is a reference to a Kanso colour: kui-color-surface and kui-color-background are paper, kui-color-on-surface is ink, kui-color-on-surface-variant is ink-muted, kui-color-primary is accent, kui-color-surface-container-low to -high are Kanso's surface, kui-color-surface-container-highest is surface-sunken, kui-color-outline-variant is divider and kui-color-error is critical. Redeclare a Kanso colour and every role that follows it moves. There are no tonal palettes. The Colour section lists every role.
Type
- Three families, all variable fonts under the SIL Open Font License 1.1: Roboto Serif, set light, is the voice (
--font-voice, and--font-brandfor the components' display, headline andtitleLargeroles); Roboto Flex runs the interface (--font-plain); Roboto Mono sets the numbers (--font-mono), andCode,KeycapandCurrencywith them. - Kanso's scale has three groups. Voice, in the serif:
t-hero(52px, the one number per screen),t-display,t-headline,t-titleandt-section. Interface, in Roboto Flex:t-body-largetot-caption. Figures, in Roboto Mono:t-figure-large,t-figureandt-figure-small. Texttakes the 15 Material Design roles today (variant="titleMedium"), and they are what the components set themselves with. Kanso's styles aret-classes in this system's tokens.css and--kui-typography-t-*custom properties in code, for a design's own text.Textmoves to Kanso's scale with the type release.- Set every amount and time in mono so columns line up.
Currencysets no size of its own: put it inside aText. - The serif appears only at 22px and above, and never bold: make it larger, or use Roboto Flex.
Shape and marks
- What you press is a pill (
kui-radius-kanso-pill): buttons, chips, badges, the segmented control, the search field. Fields, menus, snackbars and alerts takekui-radius-kanso-md(12px). Cards takekui-radius-kanso-2xl(24px) on phones andkui-radius-kanso-xl(20px) on the web. The spotlight card, dialogs and sheets takekui-radius-kanso-3xl(28px). - Shape carries feedback, from Material 3 Expressive. A pressed control tightens its corners and springs back. A selected toggle trades round for square. In a standard button group, the pressed button widens while its neighbours give way.
Buttondoes this today, and the rest of the actions family takes it with its release. - Sizes stay at Kanso's range: buttons and icon buttons go up to 56px. Material 3 Expressive's 96px and 136px buttons are not part of Kanso:
size="xl"andsize="xxl"are deprecated and draw at the largest Kanso size. - Status marks, four shapes in four states, are how a product tells its kinds of thing apart without colour. StatusMark, the component that draws them, is coming; see Shape and marks.
- The components still draw on Material Design's shape scale,
kui-radius-nonetokui-radius-xl(28px), withkui-radius-pillandkui-radius-circle, until each family moves to Kanso's corners.
Elevation
- Three layers above the ground, and nothing else marks depth:
kui-shadow-kanso-1for cards,kui-shadow-kanso-2for what floats over content (the FAB, menus, snackbars),kui-shadow-kanso-3for dialogs and sheets overkui-color-scrim. - The components read Material Design's five levels,
kui-shadow-elevation1to-elevation5, drawn from Kanso's three: level 1 is Kanso's first, level 2 its second, and levels 3 to 5 its third. Light shadows are two soft layers; dark ones are deeper, and the surface tones do most of the lifting. - No card inside a card, and no border on a raised surface. An outlined
Cardis for printed or embedded contexts where shadows don't show.
Layout and density
- Space on the 4px grid with Kanso's scale,
kui-spacing-kanso-2xs(2px) tokui-spacing-kanso-5xl(56px).kui-spacing-kanso-lg(16px) is the card padding and the phone's side margin; web pages takekui-spacing-kanso-3xl(32px) gutters.Stack'sgaptakes the library's names for the same 4px steps,xxs(2px) toxxxl(40px), withxsPlus(6px) andlgPlus(20px) between them. - Space belongs to the container: no component carries a margin.
- Phones are comfortable: controls
kui-sizing-kanso-control-lg(48px), rowskui-sizing-kanso-row(60px). The web is compact: controlskui-sizing-kanso-control-md(40px) or-sm(32px), rowskui-sizing-kanso-row-compact(44px). The components keep the heights their families have today,kui-sizing-control-xs(32px) to-xxl(136px) andkui-sizing-row-xs(48px) to-lg(88px), until each family moves. - Window size classes start at 0 (compact), 600px (medium), 840px (expanded), 1200px (large) and 1600px (extra-large). Below 840px, navigate with the navigation bar at the bottom; from 840px, with a pane on the left.
Motion
Springs move things in space, short fades do everything else, and nothing moves for decoration. Durations and easings are custom properties, not editable tokens here:
| Token | Value | Use |
|---|---|---|
--kui-motion-duration-short1 – short3 | 100, 150, 200ms | A state change on one element: hover, press, a toggle |
--kui-motion-duration-medium1 – medium3 | 250, 300, 350ms | Something entering or leaving: a snackbar, a menu |
--kui-motion-duration-long1 – long3 | 450, 500, 600ms | A whole surface: a sheet, a dialog |
--kui-motion-easing-standard, -emphasized | cubic-bezier(0.2, 0, 0, 1) | Most movement and every fade |
--kui-motion-easing-emphasized-decelerate | cubic-bezier(0.05, 0.7, 0.1, 1) | Things arriving |
--kui-motion-easing-emphasized-accelerate | cubic-bezier(0.3, 0, 0.8, 0.15) | Things leaving |
--kui-motion-easing-spring-fast, -slow | cubic-bezier(0.34, 1.56, 0.64, 1), (0.16, 1, 0.3, 1) | Spatial changes with a small overshoot; transform and size only |
Every animation honours prefers-reduced-motion: slides and springs turn into fades or instant changes.
Icons
- Use Google's Material Symbols Rounded, weight 400, grade 0, optical size 24 (20 in dense web controls), unfilled; fill an icon only for the active destination or a selected state.
- Kanso UI ships no icon font. Its controls draw their own glyphs (checkmarks, chevrons, the clear and close marks) from Material Symbols paths, and every other icon comes from the design: load Material Symbols Rounded, or use its SVGs,
aria-hidden, incurrentColor,1emsquare, so an icon takes the colour and size of its slot. Button'sicon,IconButton,Fab,Chip,Tabs.Taband a field'sleadingIconsize their icons for you. Elsewhere use the icon scale as a font size: 16px (kui-sizing-kanso-icon-sm) in badges and dense text, 20px (-md) in buttons, fields and menu items, 24px (-lg) standing alone and in a list row'sleadingslot, 40px (-xl) in empty states.- Never use emoji or illustrations as icons, and never status marks as icons. There is no logo in this system: the Kanso Labs marks live in the brand repository, and the name is set in plain type.
States and accessibility
- Hover, focus and press are a layer of the content's colour over the container, at
kui-state-layer-opacity-kanso-hover(8%),-focus(10%) and-pressed(12%). The components draw Material Design's layers today, the same 8% and 10% with 10% pressed and 16% dragged. A disabled control draws its container in ink at 12% and its content at 38%. - Keyboard focus is a 2px ring in
kui-color-focus-ringdrawn 2px outside the control. A focus indicator or a control's boundary is aborderor anoutline, never abox-shadowalone, so it survives forced-colours mode. - Selection shows in two ways at least (fill and weight, or fill and a bar), so it survives grayscale.
- Give every control an accessible name: a
label, oraria-labelon anIconButton. The Accessibility section has what the system guarantees and what every screen still has to do.
Product colours and theming
Kanso Labs' brand has no colour of its own, so the base draws in ink on paper and its accent is ink. Each product brings one colour, and only one: it fills the product roles (accent, on-accent, accent-soft, on-accent-soft, accent-on-ink and the spotlight's) and nothing else changes. A product defines its colours as a palette of those roles in light and dark, and kanso-ui-core's defineProductTheme checks it against Kanso's contrast targets. The sample product colour is violet: #6b3fa0 in light and #cdb0f5 in dark.
<ThemeScope productTheme={theme}>draws everything inside it in the product's colours in whichever scheme is in force, andproductThemeStyle(theme)does the same on<html>for the whole page. A product names no scheme, so it composes with a scheme pin around it or inside it.colorScheme.lightandcolorScheme.dark, as classes on<html>, pin a scheme over the reader's OS setting, and aThemeScope'sschemedoes the same for its part of the page. Each class is several names separated by spaces: add it withclassNameorclassList.add(...colorScheme.dark.split(' ')).- Every token is a
--kui-*custom property. Redeclare one on:rootto retheme every component, or hand aThemeScopeathememap to theme part of a page:theme={{ '--kui-color-accent': '…', '--kui-color-on-accent': '…' }}reaches every component inside the scope and nothing outside it. The map is typedKuiThemeand holds one value per property, so a theme with a light and a dark value is two maps, the scope handed the one for the scheme in use. tokens.cssfrom kanso-ui-core is the list of those properties, a reference rather than a runtime dependency. A page that loads it declares every colour on:rootunderprefers-color-scheme, and those declarations win over a pin, so an app that pins a scheme or a product does not load it.
The Product colours section has the sample's values and ratios, how a product defines its colours, and the steps for choosing a colour for another product.
Building with the components
- Every component is imported from
@kanso-labs/kanso-ui, which needs React 19:import { Button, Card, Stack, Text } from '@kanso-labs/kanso-ui'. No provider or theme wrapper is needed. - The same package carries the date values the date components take (
CalendarDate,parseDate,Time,today…), the theming classes andThemeScope, and the React Aria utilities an app needs around them:I18nProvider,useListData,useTreeData,useFilter,parseColor,VisuallyHidden,Virtualizer. Use these copies, never a second React Aria or@internationalized/date: a second copy has its own contexts and classes, and the components ignore it. - Paint the page yourself:
background: var(--kui-color-paper),color: var(--kui-color-ink),font-family: var(--font-plain). That is the canvas every surface here is drawn for. - Style a component through its props (
variant,size,tone,shape), and position it from outside withclassNameandstyle, which reach the element it renders. Never call StyleX in a design; it is compiled into the stylesheet already. - Lay out with
Stack(onegapfrom the spacing scale between a row or a column of children;align,justify,wrap) andContainer(a centred measure withmaxInlineSizeandpadding). For a list beside a detail pane useListDetail; for a main pane with a companion,SupportingPane. - Set every piece of text with
Text, never with raw font sizes:variantis one of the 15 type roles,toneone ofneutral,muted,primary,positive,negative,errororinherit.Textrenders a<span>;blockmakes it a<p>, andrender={<h2 />}changes the element without changing the style. - Open an overlay (
Dialog,Sheet,Popover,Menu) with aButtonorIconButtonplaced directly inside it, and close it with any button inside its content givenslot="close". A dialog nothing on the page opens is itsDialog.Contentalone, withisOpenandonOpenChange. - Keep one accent action per screen. Until the actions family moves to Kanso, a
filledButtondraws in the accent: give the screen's one main actionfilled, and the resttonal,outlinedortext.
import { Button, Card, Currency, Stack, Text } from '@kanso-labs/kanso-ui'
function Summary() {
return (
<Stack gap="lg">
<Text render={<h1 />} variant="headlineMedium">Headline</Text>
<Card variant="elevated">
<Stack gap="sm">
<Text variant="titleMedium">First item</Text>
<Text variant="headlineSmall">
<Currency currency="EUR" locale="en-US" value={-128.4} />
</Text>
<Stack direction="row" gap="sm" justify="end">
<Button variant="text">Edit</Button>
<Button variant="filled">Save changes</Button>
</Stack>
</Stack>
</Card>
</Stack>
)
}
What is built and what is coming
| Kanso component | In Kanso UI today |
|---|---|
| AppBar, Avatar, Badge, Breadcrumbs, Button, ButtonGroup, Card, Checkbox, Chip, Dialog, EmptyState, Fab, IconButton, Link, ListItem, Menu, Meter, NavigationBar, ProgressIndicator, RadioGroup, SearchField, Select, Sheet, Slider, Snackbar, Switch, Table, Tabs, TextField, Tooltip | Built, under the same names. Each takes Kanso's look with its family's release. |
| Divider | Separator, which becomes Divider's look. |
| SegmentedControl | SegmentedButton is the control; SegmentedControl's look is coming. |
| Figure | Coming. Currency inside a Text sets amounts today. |
| NavigationPane | Coming. NavigationRail and NavigationTree hold the destinations on wide windows today. |
| SpotlightCard, StatusMark, InlineAlert | Coming. |