Density
Compact, comfortable and touch spacing for a whole subtree.
Overview
Density retunes padding, gaps and control heights without touching colour or radius. compact suits application UI and comfortable suits marketing pages.
Wrap a subtree in DensityProvider and every Koala component inside follows. touch is the third value, for tills and kiosks: controls grow to a 48px floor and small copy steps up to 16px.
TSX
import { DensityProvider } from "@/lib/density"
export function AppShell({ children }: { children: React.ReactNode }) {
return <DensityProvider density="compact">{children}</DensityProvider>
}New to Koala UI?
The Quickstart sets Koala UI up in a React app and renders your first component in about five minutes.