@k8ordo/ui

Components

Every component in @k8ordo/ui. Pick a card to see it working, with its props.

Buttons

A button that runs an action on click. color and variant set its look.

A button that copies text to the clipboard and shows that it did.

A button that shows only an icon. label is required, and becomes its tooltip and accessible name.

A group of buttons that the arrow keys move between. Use it for a row of related actions, such as an editor’s formatting buttons.

Navigation

A text link. An external link gets a new-tab icon.

A breadcrumb trail showing the path to the current page.

Paging with previous and next buttons and the current position. There is no list of page numbers.

Side navigation with links grouped under titles. The current page is marked with a bar.

The steps of a process in order, marking the completed ones and the current one. Use it to show progress through a multi-step form.

The table of contents of a page. It marks the heading being read.

Switches content with tabs. Panels cross-fade, and the keyboard follows the WAI-ARIA tabs pattern.

Forms

A field for picking several options from a fixed list. The choices show as tags that can be removed one by one.

A month grid for picking one day. The value is YYYY-MM-DD, and it submits nothing to a form.

A checkbox. The label goes in label, and onChange receives checked.

A multi-select whose options are cards. Use it when each option carries a description or a visual.

A group of checkboxes whose selection is one array value.

A field for picking a color as #rrggbb, with hue, saturation and lightness sliders and swatches.

A field for picking one option. Typing filters the options, or search asks a server for them.

The browser’s own date input (type="date"). The value is a YYYY-MM-DD string.

A date input with a calendar that opens in a popover.

A file field, composed from a trigger, a dropzone and the list of chosen files.

A wrapper for <form>. action takes a Server Action or a URL.

A wrapper that gives a field its label, help text and error text. The field itself is drawn in renderInput.

A number field. Arrow keys and the stepper buttons change it by step, and an empty field is null.

A password field with a show/hide toggle.

A group of radio buttons. Pass the options to options; onChange receives the chosen value.

A single-select whose options are cards. Use it when each option carries a description or a visual.

A slider with two thumbs for picking a range. Use it for a pair of values, such as a minimum and a maximum price.

A <select> for choosing one option. Pass the options to options as { value, label }.

A single-thumb slider. Use it for one value within a range, such as a volume.

A switch between on and off. Use it for a setting that takes effect right away.

A multi-line text field. With autoResize, its height follows the text.

A single-line text field. Pass type to get the browser’s own input for an email address, a date, and so on.

Data Display

A collapsible section. Pressing its heading opens the body.

A user’s picture. Without an image it shows the fallback text or an icon.

A small label for a status or a category. tone picks the status color.

A card that groups content. By default it has a shadow, meant for a bg-subtle page.

Slides that snap one at a time as they scroll, with previous and next buttons. There is no autoplay.

Inline code. Use it for an API name or a file name in a sentence.

A code block highlighted on the server, with a copy button. Its entry is @k8ordo/ui/code-block.

A table with sorting, row selection and column visibility. Every piece of state is yours.

A heading. level picks the element, h1 to h6.

One keyboard key, drawn as a key cap. Use it when describing a shortcut.

A container that puts the typesetting of body text back into HTML rendered from Markdown or MDX. Wrap an article’s body in it.

A table that keeps <table> semantics and scrolls sideways when it overflows.

A hierarchy whose branches open and close, for a file tree or an outline. The keyboard follows the WAI-ARIA tree pattern.

Feedback

Reports the result of an action or the state of the application. A screen reader announces it when it appears.

A note inside the content. It holds a tip or a pitfall, with paragraphs and code.

What a list, a table or a search shows when it has nothing. It says so and offers the next action.

A progress bar. Leave value out when how far along it is cannot be known.

A placeholder for content that has not loaded yet.

A spinner that shows something is loading.

A notification that appears briefly at the bottom of the screen. Show one with open from useToast.

Overlays

A palette that filters commands as you type and runs them from the keyboard.

A menu that opens where the user right-clicks. Use it for actions on one item, such as a file row.

A heading, a body and a close button, placed inside Modal.

A panel that slides in from the edge of the screen. Use it for navigation or secondary actions without leaving the page.

A menu that opens from a button. Each item has a label and an onAction, and SubMenu nests one.

A list that opens from a button, for picking one option. Use it for a setting outside a form, such as items per page.

An overlay opened in a <dialog>. Dialog and Drawer build on it; use it directly for content of your own.

A popover that opens next to its trigger. CSS Anchor Positioning places it.

A tooltip that shows a hint on hover and focus.

Layout

Lays children out on a CSS grid, with a fixed column count or auto-fill / auto-fit.

Two panes split by a divider that the user drags or moves with the arrow keys.

A dividing rule. Put it between sections, or between items in a row.

Lays children out in a row or a column with equal gaps. gap comes from the spacing tokens.

Observers

Reports whether its children are in the viewport or a scroll container. Use it for lazy loading or scroll-triggered reveals.

Calls onChange when the size of its children changes.

Icons

The icons in @k8ordo/ui/icons. Each is an aria-hidden <svg>, and the control around it carries the name. An icon is named for the shape it draws, not for a use.

k8ordo

React libraries that use Baseline features without holding back.