# @orz/ui > A UI library by AI, for AI: React components, a theme store and guidelines for tools people live in all day, on a desktop with a mouse and on a phone with a thumb. Every page below is Markdown, at its route's `index.md`. To build an app with @orz/ui, load the skill at [skills/orz-ui/SKILL.md](/ui/skills/orz-ui/SKILL.md) first: it says how the components are meant to be used. Storybook documents every export with its props. ## Start - [Start](/ui/start/index.md): Install @orz/ui, load its stylesheet, create a theme store, and render a first component. ## Guidelines - [Guidelines](/ui/guidelines/index.md): Principles, foundations, desktop and touch, and which component to reach for. - [Principles](/ui/guidelines/principles/index.md): The rules the rest of the guidelines follow from. When a page is silent, these decide. - Foundations - [Color](/ui/guidelines/foundations/color/index.md): A token names a role; the user's theme picks the colour. Every surface, line and text reads one. - [Typography](/ui/guidelines/foundations/typography/index.md): One sans family at three sizes, a monospace for what is copied, and numbers that line up. - [Layout & spacing](/ui/guidelines/foundations/layout-and-spacing/index.md): A 4px grid, space that grows with the distance between ideas, and one breakpoint between a phone and the rest. - [Surfaces](/ui/guidelines/foundations/surfaces/index.md): The page's ground, the cards that stand on it, the panes an app is built from and the frames set in their flow: what each holds, and what never goes inside what. - [Density](/ui/guidelines/foundations/density/index.md): Compact by default for a mouse, larger by itself on touch. Step down a size only where many controls share a row. - [Motion](/ui/guidelines/foundations/motion/index.md): Short, quiet and only where it explains a change: where something came from, or where it went. - [Icons](/ui/guidelines/foundations/icons/index.md): Lucide, at the size of the text beside it, in the colour of that text. An icon alone always carries a name. - [Theming](/ui/guidelines/foundations/theming/index.md): The user picks the theme, the mode and the variant; the app offers the choice, remembers it, and never overrides it. - [Styles](/ui/guidelines/foundations/styles/index.md): A style draws the components: their shape, type, density and motion. The user picks it beside the theme, and no style may move what keeps a screen usable. - Platforms - [Desktop & pointer](/ui/guidelines/platforms/desktop-and-pointer/index.md): Hover hints, the keyboard reaches everything, and shortcuts speed up what is already on screen. - [Touch & mobile](/ui/guidelines/platforms/touch-and-mobile/index.md): Hit areas and room between targets from the components, content clear of the notch and the on-screen keyboard, and no gesture as the only way. - Patterns - [Choosing a control](/ui/guidelines/patterns/choosing-a-control/index.md): Switch, Checkbox, RadioGroup, Select: they all pick a value. The right one tells people when it takes effect and how many they may pick. - [Actions & buttons](/ui/guidelines/patterns/actions-and-buttons/index.md): One primary action per surface, the rest quieter, and the rare ones in a menu. A button's look says how much it matters. - [Feedback](/ui/guidelines/patterns/feedback/index.md): Toast, inline message or dialog: where a result is said depends on whether people have to do something about it. - [Overlays](/ui/guidelines/patterns/overlays/index.md): Dialog, Sheet, Popover, DropdownMenu, HoverCard and Tooltip: how much each one interrupts, and what it becomes on a phone. - [Forms](/ui/guidelines/patterns/forms/index.md): A form is a column of labelled fields with one submit. Labels stay visible, errors sit under their fields, and nothing is lost on the way out. - [Loading, empty & error](/ui/guidelines/patterns/loading-empty-and-error/index.md): Loading, empty, failed and loaded each look different and say so. Nobody should have to guess which one a blank area is. - [Destructive actions](/ui/guidelines/patterns/destructive-actions/index.md): Undo over confirm: make a destructive action reversible and offer Undo, and confirm only what cannot be taken back. - [Navigation](/ui/guidelines/patterns/navigation/index.md): TabNav, Breadcrumb, NavList, Tree and Tabs: where the reader is, and how they get somewhere else, drawn the same way in every app. - [Code blocks](/ui/guidelines/patterns/code-blocks/index.md): Code in a document sits in a frame that copies it, says what it is, and keeps a long block from burying the text around it. - [Comparing images](/ui/guidelines/patterns/comparing-images/index.md): MediaCompare for two versions of a picture in the page: side by side, swipe, onion skin or difference, at one scale; an author's image pair in Markdown, and MermaidCompare for a diagram. - [Long content](/ui/guidelines/patterns/long-content/index.md): A long block in a document is cut at one height, fading out above a Show all bar: code shows the rest in place, a patch or an embedded file opens in the viewer. - [Reordering](/ui/guidelines/patterns/reordering/index.md): A list ordered by hand: a drag handle and a pair of move buttons on every row, the app's rules for where a row may go, and one move handed over each time; and a board, whose cards move between its columns. - [Search](/ui/guidelines/patterns/search/index.md): A box people search from keeps the queries they ran and draws values as the app does: which boxes keep them, in which bucket, when a query counts as searched, how a value looks, the words an app finishes, groups and the status line, where the panel goes, slash commands, and a box that only jumps. - [Toolbars](/ui/guidelines/patterns/toolbars/index.md): A row of commands that fits the width it is given: what does not fit goes into a ⋯ menu, in an order the caller sets, and comes back as the room does. - [Writing Markdown](/ui/guidelines/patterns/writing-markdown/index.md): Where people write more than a line, a comment, a description, a note, give them MarkdownEditor: files go in where they are pasted, and the reader keeps a plain text box if they ask for one. - Content - [Writing](/ui/guidelines/content/writing/index.md): Voice, labels and capitalisation: the words on buttons, in dialogs and in messages, written the way a person would say them. - [Accessibility](/ui/guidelines/content/accessibility/index.md): Contrast, focus, keyboard, target size and names: what every screen has to meet, with the WCAG 2.2 criterion behind each number. ## Demos - [Demos](/ui/demos/index.md): Whole screens built only from @orz packages and sample data. Resize them, or open them on a phone. - [Releases](/ui/demos/releases/index.md): A release console: releases narrowed from a sidebar and a search with qualifiers, picked in bulk and rolled out, and each one's plan, log, diff, recording, config, artifacts and notes beside the list. - [Gallery](/ui/demos/gallery/index.md): Every component page as one live tile: a package to a group, a filter by name, and a jump to any package. - [Settings](/ui/demos/settings/index.md): An app's settings: switches that apply as they flip, a profile form that guards its unsaved edits, the user's theme, and the one step that asks before it destroys. - [Sign in](/ui/demos/sign-in/index.md): A sign-in page and the steps around it: a remembered account, the whole form, a code by email to reset the password, a second step, and each error said where it happened. - [Admin](/ui/demos/admin/index.md): A workspace's admin: sections in a top bar, a dashboard of modules, members and invitations with undo, usage and billing, an audit log, and settings with a danger zone; a new workspace, a page you may not see, and one that does not exist. - [Tasks](/ui/demos/tasks/index.md): A task list: a table filtered from menus you can search with a menu on every row, or the same tasks as a board with a column for each status that you drag them across, one or several at once; details beside them or in a sheet on a phone, and bulk actions that close with Undo and ask only before they delete. - [Mail](/ui/demos/mail/index.md): A whole mail client: folders and labels that are saved searches, conversations you can select, archive and undo, a compose window docked in the corner, single-key shortcuts, and on a phone one pane at a time with the reply box above the on-screen keyboard. - [Notes](/ui/demos/notes/index.md): A notebook: markdown notes beside their preview, diagrams drawn from mermaid fences, files embedded by name, and a / that offers blocks and a # that offers the tags already in use. - [Pull request](/ui/demos/pull-request/index.md): A pull request in a code-hosting app: the conversation in markdown with a box to answer in, its commits, the CI run that blocks the merge with its logs, recording and artifacts, and the changed files, each file drawn by the package Content picks for it. - [Repository](/ui/demos/repository/index.md): A repository's working tree in a code-hosting app: its files in a tree marked with what git says of each, a filter that hides, opens or closes folders around the matches, and the file or folder picked beside it, a changed file with its diff a click away. - [Config editor](/ui/demos/config-editor/index.md): JSON config files edited in place: the first syntax error named by its line under the editor, Save held back until the file parses, the edits reviewed as a diff before they are saved, and a question before switching away from unsaved ones. - [Binary inspector](/ui/demos/binary-inspector/index.md): A hex editor for one file: a sample, or one of your own, opened or dropped and read in the browser alone. A PNG's chunks or a ZIP's headers list beside the bytes and select them, an inspector reads the selection as numbers and text, and the edits download as a new file. ## Optional - [Every page in one file](/ui/llms-full.txt): the pages above, in this order. - [Storybook](/ui/storybook/): every export, live, with its props.