Motion-first React components built on ui-sdk, with docs your coding agent can read and controls an agent in your app can use.
The words in the middle of a chart drawn round a centre: a value that rolls to each new one over a caption that swaps in place, sized to the hole. The Donut and Radial charts draw on it.
What every family of charts shares beside the chart root (how a chart loads, plays its entrance and keeps what leaves, picking, `activeIndex`, its parts, its axes and its words), and the families on it. The cartesian family: the stops along x and the ones leaving, the frame the cartesian model fits, what its parts declare, and the reader that tells the root how the pointer and the keys reach the stops, every series at once, one at a time, or points placed by both values. The family of charts whose stops are a list, such as a donut’s slices, with its reader. The readers of the tree, flow and grid families, for the Treemap, the Sankey and the Heatmap.
What the charts drawn as flows between steps share: the graph a chart’s rows make, the column each node stands in, the nodes and bands d3-sankey lays it out in, every way through a node or a flow, what sits under a point, the keys’ way between nodes, and where each shape comes from and goes to when the data changes. The Sankey chart draws on it.
The cartesian frame: an x axis, a value axis for each axis the config names, and each series’ spans and the tooltip’s place, worked out by the kinds of mark a chart draws. One pure function of the props, so the server draws the range the browser does.
How a chart drawn as a grid of cells lays its data out, in columns and rows named by two of each row’s values or as the weeks of a calendar, with a cell for every pair or day the data leaves out, and the steps of the colour its cells take. Pure functions, so they are tested on their own.
The series of a chart drawn as lines, on the chart core: each line and its fill moving from where it is on one transition, the window that keeps the lit category bright while the rest steps back, the dots that mark it, and the placeholder. Line chart, Area chart, Bump chart and Sparkline share it.
Lines in the cartesian frame: their values, which never stack, how far they reach, and their points as fractions of the plot.
A chart whose x is a window of time, still or live: the clock its plot scrolls on, as pure maths, and the layers that play it on the compositor, so a row that arrives moves nothing.
The maths every chart shares: series and stacks, the scales (bands and points of categories, numbers and times) and their ticks, where the pointer and the keys land, label spacing and the cascade order. Pure functions, so they are tested on their own.
Points in the cartesian frame, placed by both values: their extent, with a lone value in the middle of its range.
What the charts drawn as points share: each series’ shape, a point that glides, grows in and shrinks away, and a series’ layer of points that steps back while one is lit and shows that one bright above it. The Scatter chart and the Composed chart draw with it.
What the charts drawn round a centre share, on the chart core: places as turns from the top, an arc’s sweep and the radius that fits it in its plot, a ring’s slices and bands, the slice, ring or axis under the pointer, the tooltip’s side, and the labels round the edge that stand upright and travel round with what they name, with the room they need. The rings of a tree too: each arc’s path by d3’s arc, the arc under the pointer, and how its name lies on it. The Donut, Radar, Radial and Sunburst charts draw on it.
The root every chart sits on, whatever its shape: its series and their colours, what is hidden and brought forward, the frame, the plot that takes the pointer and the keys, the one tooltip, the loading, empty and error states, the data table, the announcements, the focus held by key, the moves, and what an agent reads and does through ui-sdk’s agent bridge.
What the charts drawn as nested boxes share: the tree a chart’s rows make, the part of it in view, its groups and tiles laid out by d3-hierarchy’s squarify with room for each group’s header, where a box comes from and goes to when the view zooms in or out, and whether a label fits its box; the same tree packed as nested circles by d3-hierarchy’s pack, the one move that zooms the packing to a part, the circle under the pointer, and whether a label fits a circle; and the same tree laid round a turn by d3-hierarchy’s partition, as rings from the part in view, with where each arc comes from and goes to. The Treemap, Circle packing and Sunburst charts draw on it.
What every chart of a tree that zooms shares: its root, whose groups are the tree’s tops, with what is hidden and the part in view, and the way back out, a Breadcrumb of the parts above the one in view, each a button that zooms out to it, with focus kept on the plot as a crumb folds away. The Treemap, Circle packing and Sunburst charts sit on it.
A checkbox whose tick wipes in along its stroke, in reading order. In a group, a parent that selects all ticks its boxes one after another, top to bottom.
Any number of options, each a card with a title, a description and room for a price or an icon. Ticked, the card fades to grey and its empty box gives way to a check that wipes in; cleared, both fade back.
Each card is the checkbox, so a press anywhere on it ticks it. A ticked card fades to grey and a check wipes in; cleared, both fade back.
Wrap it in a <label> with its text. The tick wipes in from the start of its stroke, and wipes back out when cleared.
A disabled box fades and can’t be pressed. Say why beside it, as here, so nobody wonders.
Set invalid on its Field once the person tries to go on without it, and give FieldError the reason.
In a CheckboxGroup with allValues, a checkbox with parent selects all. It shows a dash while only some are picked, and the boxes it changes tick one after another.
Each row is a <label>, so a press anywhere on it picks the row. Name a box that has no text with aria-label.
A chip's look, its remove button and its exit: a small piece that stands for one value. The Tag input's tags and the Token input's tokens share it.
What Checkbox, Radio and Switch share: the hit area, focus, invalid and disabled states, a held press, and the wipe that draws a mark. Also the cards of Checkbox cards and Radio cards, which fade to grey when picked.
A whole as circles packed inside each other, each as large as its value, or rows with no children as one cloud of bubbles: coloured by group, or by a value of their own on a ramp from zero, with a key of sizes. A press on a group zooms into it as one move until it fills the chart, and a path above it, or Escape, zooms back out. The circle under the pointer or the keys stays bright while the rest step back, and new data moves every circle from where it is.
Rows with no children pack into one cloud, each in the next of the chart’s colours. CirclePackingLegend adds a key of sizes.
colorKey colours each circle by a value of its own, a step of one colour above zero and another below, named by CirclePackingLegend.
Teams with their tools inside, coloured by team, with each team’s name on it. Press a team, or a tool in it, to zoom in until it fills the chart; CirclePackingPath above it, or Escape, zooms back out. Another month moves every circle from where it is.
zoom and onZoomChange hold the part in view as the path of names to it, so controls of your own and the chart’s presses agree, and new data keeps it.
Code with its colours, under a header that names the file or holds a tab for each one, with a Copy button. Line numbers, highlighted, added and removed lines, and a long file that shows its first lines until expanded.
added and removed mark a change with a sign and a colour, as a diff does, while the code keeps its own colours.
startLine numbers a few lines quoted from further down a file, and the marks count from it.
One file shows its name in the header; several get a tab each, and Copy takes the file shown. highlighted marks the lines to read first.
With collapsedLines, a longer file shows its first lines and fades out above a button that shows the rest. A file only a few lines longer shows in full.
Set --code-block-max-height and a long file scrolls inside the block, with a thin scrollbar, instead of collapsing.
A tab for each package manager. Hold the pick with value and onValueChange to keep every command on the page on the same one.
The lines of a code block: coloured tokens, a gutter of line numbers, lines marked as highlighted, added or removed with the words they changed, the box they scroll in, which folds to its first lines and unfolds on the layout role, and the card and header they sit in.
One panel shown and hidden from a header row whose chevron turns down, on the Accordion’s motion: it turns back from where it is when pressed midway, and content that grows while open moves the panel with it.
Content that grows or shrinks while the panel is open takes the panel, and what sits below, with it.
Hold open yourself to open sections from elsewhere, as Expand all does.
Each section opens on its own. Its chevron turns down, and the panel pushes what sits below it.
A disabled collapsible fades and stays as it is.
With hiddenUntilFound, the browser’s find in page searches the closed panel and opens it on a match. Press ⌘F or Ctrl+F and search for Lisboa.
ui-sdk’s Color picker: picks a colour by eye on an area, by number on OKLCH channels, or from presets, and reads any CSS colour typed in. A picked or typed colour glides every thumb to it.
With space="oklch" it edits OKLCH: lightness, chroma and hue on labelled sliders, written as a theme file writes its tokens. A colour past what the screen shows is kept, and the preview says so.
An area for saturation and brightness, hue and opacity below it, the value in any format and presets. Here each label opens one in a popover.
Every part fades and takes no input. Say why beside it.