Density
How much room controls, rows and surfaces take. Pick Snug, Balanced or Airy for the whole app, or for one part of it.
Pick a density
The tabs, the rows and the buttons change height and padding together, and text stays the same size.
Set the density
Components install with the density tokens and use Balanced unless you set another. Put data-density on <html>:
export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <html lang='en' data-density='snug'> <body>{children}</body> </html> )}Or on any element, to change one part of a page:
<aside data-density='snug'> <Filters /></aside>A dialog or a popover renders under <body>, so it takes the page's density, not the density of the element its trigger sits in.
Tokens
Each density gives every token a size, here in pixels at a 16px root.
The tokens are in your global CSS, one block per density. To change a value, add a rule of your own below them:
[data-density='snug'] { --control-height: 1.875rem;}Don't edit the blocks themselves, because adding another Kino component writes them again.
Use the tokens in your own component
function SearchField(props: React.ComponentProps<'input'>) { return ( <input type='search' className='h-(--control-height) rounded-md border px-(--control-padding) text-sm' {...props} /> )}