Motion-first React components built on ui-sdk, with docs your coding agent can read and controls an agent in your app can use.
A group inside a panel resizes on its own, and takes the variant of the group around it.
Set orientation to vertical to stack the panels. Sizes in pixels, such as minSize="72px", keep a panel from closing up on a short screen.
Moves an element from one size to another on its own transition, then hands the size back to layout; a change mid-way goes on from where it is. Also the panel that opens and closes on its height, and follows its content while open, a table’s columns gliding to new widths, and a change made at once with transitions off. Accordion, Collapsible, Dialog, Drawer, Slider, Swap, Table and the choice cards share it.
Text that rolls when it changes, like an odometer: each character that differs leaves one way and its replacement arrives from the other, or a digit spins to its new one. Animated number, Number field and Date input roll their digits with it.
Whether the screen is wider than a phone, so a part can show less, or open as a bottom sheet, where there is no room.
A custom property run from 0 to 1 on its own transition, read each frame for what CSS can’t draw, such as a number counting, so the feel, reduced motion and slow motion time it. Also registers custom properties once per page. Animated number, Highlight and the Line and Radar charts share it.
Flows between steps, such as where visitors go or where money goes, as bands as thick as their value between nodes as tall as what passes through them, with each node’s name and value beside it where they fit. A node or a flow under the pointer, or a node the keys reach, keeps every way through it bright while the rest step back, and new data moves every node and flow from where it is.
A node’s color in the config, here the destructive colour where trials drop off; the flows into it fade to it.
sort="data" keeps each column in the rows’ order, as a budget reads, and linkColor="source" paints each flow in its source’s colour.
Flows from where visitors came, to the page they opened first, to whether they started a trial. Hover a node or a flow to light every way through it; another month moves every node and flow from where it is.
A bar that rises from the bottom of the screen while a form has unsaved changes, with Discard and Save. It shows the save running, leaves once it has worked, and swells to say no when the person tries to leave first.
Discard puts every Field back to its defaultValue; put state you own back in onDiscard.
Put it in a Form, after the fields, and save in onFormSubmit: change a field and the bar rises; a promise shows the save running, and the bar leaves once it has worked.
A rejection or a throw from onFormSubmit keeps the changes and says the save failed, so the person can try again.
Points placed by two values on the chart core’s XY frame, or bubbles sized by a third, each series in its own colour and shape so colour is never the only sign. The point nearest the pointer stays bright while the rest step back, the arrows step through the points by x and by y, and new data glides every point to its new place.
size makes each point a bubble whose area is its members. Another quarter glides every workspace to where it went, so each can be followed.
Without size, every point is the same size. A reference line marks the budget, and both axes start at zero.
series gives each region its colour and its own shape. axis='x' puts a reference on the x axis, here a band of busy load, and the line marks the average.
A small picture of a product at work that plays once, a step at a time, when it is seen, and lands on its end under reduced motion. A script plays timed events through a reducer when asked, on the page’s clock, and can stop part-way and wait for the visitor’s decision.
What a box that scrolls shows about it: its edges fade while content is hidden past them, a row keeps its picked or focused item in view, an item held at the top while what is above it closes, it takes focus as a named region while its content is larger than it, and a move linked to the page’s scroll. Tabs, the Segmented control, the Accordion, the panels, Table, Scroll area and the Hero blocks share it.
A box that scrolls with thin scrollbars of its own over its edge, which fade in while the pointer is over it or it scrolls and fade out once it rests. Each edge fades while there is more past it, as the Tabs and Table do, and a Jump to end button can show while the view is away from its end.
Content larger both ways scrolls both ways, with a bar on each side and every edge fading.
Give it a height and it scrolls what is taller. Its scrollbar shows while the pointer is over it, and the bottom edge fades while there is more below.
Content wider than the box scrolls sideways, with its bar along the bottom. Make the row as wide as its items with w-max.
A text field for searching: a clear button once there is text, Escape to clear, a shortcut that focuses it from anywhere, a spinner while results come, and a count of what it found. It can sit short in a toolbar and widen while in use.
The count rolls to each new number and a screen reader hears it. countLabel says it in your words.
Press / to search. Pass loading while results come: the icon turns into a spinner once a search lasts 200ms, and count says how many it found.
Escape clears the field first and closes the dialog only once the field is empty.
Short in a toolbar, it widens into the room it is given while it is in use. Press Mod K to try it.
The heading over a section of a landing page, as the Pricing and Features blocks share it: a few words naming the topic, the title, one sentence under it, and whatever the section puts below.
One of a few options, picked from a row: a radio group a form submits, drawn as the Tabs are, with the pill sliding to the pick and a backdrop under the pointer.
Hold the value to change it from outside. Change it again mid-slide and the pill turns from where it is.
The pill slides to the pick, and each label changes colour as the pill crosses it, as on the Tabs. A backdrop follows the pointer.
disabled on a segment turns off that option; on the control it turns off all of them and fades the pill.
A segment with only an icon needs an aria-label and a square shape.
Give it a name and the form sends the picked value. Give it w-full and each segment flex-1 to share the width.
Inside a Field set invalid, it rings in the destructive colour. Here it is invalid until something is picked.
An icon in SegmentedControlIcon rolls to its checkedIcon when its segment is picked. An icon that stays the same goes in the segment on its own: rolling to itself would show nothing change.
Set orientation to vertical for a column, as beside a calendar or a setting with longer labels. The pill slides down it, and the arrow keys move either way.
How ui-sdk's date and time segments are drawn: one highlight glides between the segments and each number rolls to its new value. Date input and Time input draw it.
A select that opens over its trigger, with the picked option on the value, and unfolds out of the trigger's own outline. One highlight glides between options; groups, long lists that scroll and multiple values.
It opens over its trigger with the picked option on the value, and unfolds out of the trigger’s outline.
Group options under a label; a long list scrolls.
In a Field, its label names it, the Field’s name sends its value with the form, and a disabled option can’t be picked.
With multiple, it stays open while you pick, and SelectValue takes a function for what the trigger shows.
Set alignItemWithTrigger to false to open it under the trigger, where it grows as a Popover does.
A 1px line between groups of content, across or down. The menus, the Select and the Toolbar draw their lines with it.
A line across, between the groups of a summary.