# António > A component library for calm product UI. > Every piece comes with its code, the theme's tokens and its motion, in Day and Night. ## Install In the app's folder, new or existing, the same command: ```sh npx antonio-ui init ``` It looks before it writes. It keeps the app's own setup, adds the theme as its own file, antonio.css, imported once at the top of the app's main CSS file, and takes out only the stock theme António replaces (a starter's own tokens). It lists what of the app's own still clashes with António: a name both set (the app's wins, since it comes after), a variant the app redefines, a `--color-*: initial` that would clear António's colours, and the app's old accent, which belongs in brand.css. Safe to run again. Night: put the dark class on the html element. Day is the default. Then add pieces one at a time, or every piece. To update a piece, add it again: ```sh npx antonio-ui add button npx antonio-ui add all ``` An app never edits an António file: it wraps or composes the piece in a file of its own. The installer records what it writes (antonio-installed.json), so it never replaces a file the app edited, or a file that is not António's (the app's own, or a stock copy), without being told to, and it lists which of the app's imports a replacement would break. Nothing is written until then. To replace them anyway: ```sh npx antonio-ui add button --replace ``` After every add it type checks the app and shows only the errors the add brought. Pieces take asChild as well as render, so code written the asChild way (``) works as it is. `node scripts/antonio-check.mjs` lists every António file as unchanged, changed upstream only or edited locally, without writing anything. An app's own accent goes in brand.css, the only file an app sets over António; the installer imports it after antonio.css: ```sh npx antonio-ui add brand ``` ## Rules - Tokens only: colours, sizes, radii and shadows come from the theme. No new values. - Icons come from @/components/icons (António's own set). No other icon library. - Two font weights: 400 and 500. - Motion runs on the motion variables only: ease-drum for things arriving, ease-even for things resizing or leaving, duration-overlay (100), duration-quick (150), duration-move (300), duration-theme (400, the Day and Night reveal only). Nothing moves on page load. Reduced motion turns movement off; content only fades. - Day and Night, always. No pure black. Night ceiling: no Night colour is lighter than #e2e2e1. - Example content lives in one world: Maré, a Lisbon company whose app books surf lessons. António Ferreira is Head of Product. - No em or en dashes in copy, comments or docs. - Never edit an António file (a piece, the icons, a hook); wrap or compose it in the app's own file, so an update never loses work. - Blocks follow four habits, so an improved piece flows into every block on its own: 1. Blocks import pieces and never paste their code in. 2. No one-off styling inside blocks: only layout classes (flex, grid, gap, padding, margin, sizes, position, alignment). A block that needs something new gets it as a piece change. 3. Piece APIs stay stable: props are added, never renamed or removed. 4. Every block has a quick visual check, so a piece change that shifts a block shows up at once. ## Library - [Accordion](https://www.antonio-ui.com/library/accordion.md): A stack of headings that each open to show more text. - [Action Bar](https://www.antonio-ui.com/library/action-bar.md): A bar that floats at the bottom of a list while rows are picked, with the count and their actions. - [Alert](https://www.antonio-ui.com/library/alert.md): A boxed message on the page, with an optional icon, title and action. - [Alert Dialog](https://www.antonio-ui.com/library/alert-dialog.md): A modal that asks for a yes or no before something important happens. - [Animated Icon](https://www.antonio-ui.com/library/animated-icon.md): An icon whose own parts move once, when its control is hovered or focused. The header tabs and every copy swap use it. - [App Shell](https://www.antonio-ui.com/library/app-shell.md): The frame of an app. Strip, the default: a quiet sidebar on the page and one panel. Rail: the icon sidebar that folds. Both with a right panel and a full takeover. - [Aspect Ratio](https://www.antonio-ui.com/library/aspect-ratio.md): A box that keeps a fixed width to height ratio at any size. - [Attachment](https://www.antonio-ui.com/library/attachment.md): A file tile with an icon, name, details and actions, in five upload states. - [Autocomplete](https://www.antonio-ui.com/library/autocomplete.md): A text field that suggests matches as it is typed in, and keeps whatever is typed. - [Avatar](https://www.antonio-ui.com/library/avatar.md): A round picture or initials that stand for a person. - [Badge](https://www.antonio-ui.com/library/badge.md): A short status or label next to something else. - [Banner](https://www.antonio-ui.com/library/banner.md): A full width notice across a page, with an optional action and a dismiss button. - [Brand Mark](https://www.antonio-ui.com/library/brand-mark.md): An app's logo on a Primary square, so the brand layer colours it. 32, or 40 for a screen that stands alone. - [Breadcrumb](https://www.antonio-ui.com/library/breadcrumb.md): A trail of links that shows where a page sits and how to go back up. - [Bubble](https://www.antonio-ui.com/library/bubble.md): A chat message bubble in seven kinds, aligned to either side. - [Button](https://www.antonio-ui.com/library/button.md): Starts an action. Five kinds, three sizes, and an icon only form. - [Button Group](https://www.antonio-ui.com/library/button-group.md): Buttons joined into one control, side by side or stacked. - [Calendar](https://www.antonio-ui.com/library/calendar.md): A month grid for picking one date or a range of dates. - [Card](https://www.antonio-ui.com/library/card.md): A box with a header, content and optional footer actions. - [Carousel](https://www.antonio-ui.com/library/carousel.md): A row of slides people move through with arrows, swipe or the arrow keys. - [Chart](https://www.antonio-ui.com/library/chart.md): Bar, line and other charts, coloured by the theme chart tokens. - [Checkbox](https://www.antonio-ui.com/library/checkbox.md): Turns one option on or off in a list or form. - [Code Block](https://www.antonio-ui.com/library/code-block.md): A box for showing code, with an optional title, copy button, line numbers and highlighting. - [Collapsible](https://www.antonio-ui.com/library/collapsible.md): A section people can open and close to show or hide extra content. - [Combobox](https://www.antonio-ui.com/library/combobox.md): A text field that filters a list as people type, for picking one or several options. - [Command](https://www.antonio-ui.com/library/command.md): A searchable list of commands and destinations, shown inline or in a dialog. - [Confirm Popover](https://www.antonio-ui.com/library/confirm-popover.md): A small ask next to a delete button, with Cancel and a destructive button. Focus starts on Cancel. - [Context Menu](https://www.antonio-ui.com/library/context-menu.md): A menu that opens on right click or long press over an area. - [Context Meter](https://www.antonio-ui.com/library/context-meter.md): How full an AI model's context window is, split into what fills it, with a compact ring for toolbars. - [Copy Button](https://www.antonio-ui.com/library/copy-button.md): A button that copies a value and shows the copied icon for a moment, and Snippet, a one line command with copy. - [Data Table](https://www.antonio-ui.com/library/data-table.md): A Table that sorts, filters, resizes, reorders and hides columns, selects rows and pages. - [Date Picker](https://www.antonio-ui.com/library/date-picker.md): A field that opens a calendar to pick one date or a range, with optional presets. - [Description List](https://www.antonio-ui.com/library/description-list.md): Label and value pairs for one record, stacked or in two columns. - [Dialog](https://www.antonio-ui.com/library/dialog.md): A window over the page, for a short task. - [Diff](https://www.antonio-ui.com/library/diff.md): What changed between two texts, inline or side by side, and a single value's change. - [Drawer](https://www.antonio-ui.com/library/drawer.md): A panel that slides in from an edge of the screen and can be swiped away. - [Empty](https://www.antonio-ui.com/library/empty.md): The message shown where content would be, when there is none yet or nothing matches. - [Error State](https://www.antonio-ui.com/library/error-state.md): Empty's sibling for when content fails to load or does not exist, in a panel or across a page. - [Field](https://www.antonio-ui.com/library/field.md): A label, an input, and optional help or error text, stacked. - [File Upload](https://www.antonio-ui.com/library/file-upload.md): A drop zone and file list with size, progress and errors, or a compact button for one file. - [Filter Bar](https://www.antonio-ui.com/library/filter-bar.md): The filters on a list as removable chips, with Add filter and Clear all. - [Form](https://www.antonio-ui.com/library/form.md): A form in fieldsets with legends, help text, errors shown on submit, and its actions. - [Hold to Confirm](https://www.antonio-ui.com/library/hold-to-confirm.md): A button that acts only after it is held, with a fill that sweeps across while held and drains back if let go early. - [Hover Card](https://www.antonio-ui.com/library/hover-card.md): A small card of extra detail that appears when the pointer rests on a link or button. - [Image Compare](https://www.antonio-ui.com/library/image-compare.md): Two images, before and after, with a handle to drag between them. - [Inline Edit](https://www.antonio-ui.com/library/inline-edit.md): Text that turns into a field on click or Enter, saves with Enter and cancels with Escape. - [Input](https://www.antonio-ui.com/library/input.md): A single line text field. - [Input Group](https://www.antonio-ui.com/library/input-group.md): An input or textarea with icons, text, buttons or shortcuts attached inside the same frame. - [Input OTP](https://www.antonio-ui.com/library/input-otp.md): A row of single character slots for typing a one time code. - [Item](https://www.antonio-ui.com/library/item.md): A row with optional media, a title, a description and actions. - [Kbd](https://www.antonio-ui.com/library/kbd.md): A small key cap that shows a keyboard key or shortcut. - [Label](https://www.antonio-ui.com/library/label.md): The text name for a form control, tied to it by id. - [Lightbox](https://www.antonio-ui.com/library/lightbox.md): An image or a document page at full size, with a caption and Previous and Next. - [Link](https://www.antonio-ui.com/library/link.md): A styled anchor: inline in text, standalone with an arrow, or external with its own icon. - [Marker](https://www.antonio-ui.com/library/marker.md): A quiet inline note for events and status, like who joined, what is loading or where a day starts. - [Menu](https://www.antonio-ui.com/library/menu.md): A list of actions that opens from a button. - [Menubar](https://www.antonio-ui.com/library/menubar.md): A horizontal bar of menus, like the File and View menus in a desktop app. - [Message](https://www.antonio-ui.com/library/message.md): One turn in a conversation, with optional avatar, header and footer around a bubble. - [Message Scroller](https://www.antonio-ui.com/library/message-scroller.md): A scrolling chat area that keeps the latest message in view, with a button to jump to the end. - [Meter](https://www.antonio-ui.com/library/meter.md): How much of a known amount is used, like storage or a quota, with tones at high use. - [Native Select](https://www.antonio-ui.com/library/native-select.md): A styled version of the browser's own select menu. - [Nav item](https://www.antonio-ui.com/library/nav-item.md): A link in a side list, with an optional icon, count and nested links. - [Navigation Menu](https://www.antonio-ui.com/library/navigation-menu.md): A row of top level links where some open a panel of further links. - [Number Field](https://www.antonio-ui.com/library/number-field.md): A field for numbers with steppers, limits, steps and an optional currency or percent sign. - [Page Header](https://www.antonio-ui.com/library/page-header.md): The top of a page: an optional Breadcrumb, the title, a subtitle and the page's actions. - [Pagination](https://www.antonio-ui.com/library/pagination.md): Links for moving between pages of a long list. - [Password Input](https://www.antonio-ui.com/library/password-input.md): A password field with a Show and Hide button and an optional strength hint. - [Popover](https://www.antonio-ui.com/library/popover.md): A small panel that opens next to a button and stays open until dismissed. - [Popup](https://www.antonio-ui.com/library/popup.md): A short list that opens where it is clicked, with the current choice right under the pointer, for picking a value in place. - [Progress](https://www.antonio-ui.com/library/progress.md): A bar that shows how far a task has got. - [Prompt Box](https://www.antonio-ui.com/library/prompt-box.md): The composer for an AI chat, with a tray above it that says what the model is doing, step by step. - [Questionnaire](https://www.antonio-ui.com/library/questionnaire.md): A form that asks one question at a time, with choices and next and previous steps. - [Radio Group](https://www.antonio-ui.com/library/radio-group.md): A set of options where only one can be picked. - [Range Slider](https://www.antonio-ui.com/library/range-slider.md): A slider with two thumbs for a low and a high value, with an optional minimum gap. - [Rating](https://www.antonio-ui.com/library/rating.md): Five marks to give a score, or to show one read only, halves included. - [Resizable](https://www.antonio-ui.com/library/resizable.md): Panels side by side or stacked, with a divider that drags to resize them. - [Rolling Counter](https://www.antonio-ui.com/library/rolling-counter.md): A number whose digits roll like an odometer when it changes. Only the digits that change move. - [Scroll Area](https://www.antonio-ui.com/library/scroll-area.md): A box with its own scrollbar for content taller or wider than the space. - [Scroll Progress](https://www.antonio-ui.com/library/scroll-progress.md): A scroll area whose scrollbar is a column of ticks that shows while in use. - [Search Input](https://www.antonio-ui.com/library/search-input.md): A search field with a clear button, a loading state, a shortcut key cap, and a form that opens from an icon. - [Segmented Control](https://www.antonio-ui.com/library/segmented-control.md): A few options on one track where exactly one is on, like a view or a theme. - [Select](https://www.antonio-ui.com/library/select.md): Picks one value from a short list. - [Separator](https://www.antonio-ui.com/library/separator.md): A thin line that divides content, across or upright. - [Separator with label](https://www.antonio-ui.com/library/separator-with-label.md): A Separator with short text on the line, centred or at the start. - [Sheet](https://www.antonio-ui.com/library/sheet.md): A panel that slides in from an edge of the screen over the page. - [Sidebar](https://www.antonio-ui.com/library/sidebar.md): The main side navigation for an app, with a header, menu groups and a footer. It can collapse. - [Skeleton](https://www.antonio-ui.com/library/skeleton.md): A grey placeholder that shows the shape of content while it loads. - [Slide to Confirm](https://www.antonio-ui.com/library/slide-to-confirm.md): A track with a thumb to drag to the end, to confirm an action that should not happen by a slip. - [Slider](https://www.antonio-ui.com/library/slider.md): A track with one or more handles for picking a value or a range. - [Orb](https://www.antonio-ui.com/library/orb.md): A soft, slowly turning orb in the theme's colours, for a hero or an empty canvas. - [Spinner](https://www.antonio-ui.com/library/spinner.md): A small looping mark that shows something is in progress. - [Split View](https://www.antonio-ui.com/library/split-view.md): A list pane and a detail pane side by side, resizable, with an empty detail when nothing is picked. - [Stat Card](https://www.antonio-ui.com/library/stat-card.md): One number with its label, its change and an optional sparkline. - [Status Dot](https://www.antonio-ui.com/library/status-dot.md): A small dot in a status tone, alone or with a label. It never pulses. - [Stepper](https://www.antonio-ui.com/library/stepper.md): The steps of a flow, done, current, upcoming or in error, across or down. - [Switch](https://www.antonio-ui.com/library/switch.md): Turns a setting on or off, straight away. - [Table](https://www.antonio-ui.com/library/table.md): Rows of records with the same columns. - [Tabs](https://www.antonio-ui.com/library/tabs.md): Switches between views of the same thing, in place. - [Tags Input](https://www.antonio-ui.com/library/tags-input.md): A field that turns typed words into removable chips, with an optional limit and suggestions. - [Text](https://www.antonio-ui.com/library/text.md): A quiet line in the body size, muted, for the lines around a form or a list. A Link inside keeps its colour. - [Textarea](https://www.antonio-ui.com/library/textarea.md): A text field for several lines of text, at a fixed height or growing with its content. - [Time Picker](https://www.antonio-ui.com/library/time-picker.md): A time field with hour and minute segments, 24 or 12 hour, stepped by arrow keys. - [Timeline](https://www.antonio-ui.com/library/timeline.md): An activity feed grouped by day: who did what, status changes and when. - [Toast](https://www.antonio-ui.com/library/toast.md): A short message that appears in a corner after an action, then goes away on its own. - [Toggle](https://www.antonio-ui.com/library/toggle.md): A button that stays pressed or unpressed, for turning one option on or off. - [Toggle Group](https://www.antonio-ui.com/library/toggle-group.md): A row of on and off buttons where several can be on, like formatting or filters. - [Toolbar](https://www.antonio-ui.com/library/toolbar.md): A row of buttons, toggles and menus with one Tab stop and arrow keys between them, or a dock that grows under the pointer. - [Tooltip](https://www.antonio-ui.com/library/tooltip.md): A small label that appears on hover or focus to explain a control. - [Trace](https://www.antonio-ui.com/library/trace.md): A list of steps an agent or process took, each with a status and optional detail. - [Tree View](https://www.antonio-ui.com/library/tree-view.md): Nested folders and files that open and close, with keyboard moves between rows. - [Truncate](https://www.antonio-ui.com/library/truncate.md): Long text cut to a few lines with Show more, or to one line with the rest in a Tooltip. ## Foundations - [Colour](https://www.antonio-ui.com/foundations/colour.md): White and one warm grey scale, 50 to 990. Red, the status colours and cobalt are the only hues. - [Type](https://www.antonio-ui.com/foundations/type.md): Inter for text in 6 sizes, Geist Mono for code. Weights 400 and 500. - [Size](https://www.antonio-ui.com/foundations/size.md): Four control heights, 28 the default. Rows, pills, thumbs and the focus outline share named sizes. - [Corners](https://www.antonio-ui.com/foundations/corners.md): 6 steps in use, 2 to 16. Outer corner equals inner corner plus padding. - [Spacing](https://www.antonio-ui.com/foundations/spacing.md): 4px a step: the class number times 4. These are the steps pieces use most. - [Layout](https://www.antonio-ui.com/foundations/layout.md): One page width with its gutters, the breakpoints pieces use, and App Shell's regions. - [States](https://www.antonio-ui.com/foundations/states.md): Hover and pressed shift tone, pressed sinks 1px. Rings only for focus and errors. - [Focus](https://www.antonio-ui.com/foundations/focus.md): An outline on keyboard focus only. A field shows its edge and halo on any focus. - [Marks](https://www.antonio-ui.com/foundations/marks.md): One solid square mark, one ring, one Switch. - [Icons](https://www.antonio-ui.com/foundations/icons.md): One icon set, 16 grid, strokes always 1px. - [Elevation](https://www.antonio-ui.com/foundations/elevation.md): Flat by default. Paper for things that float, a scrim behind dialogs. - [Day and Night](https://www.antonio-ui.com/foundations/day-and-night.md): Night is never brighter than 300. ## Motion - [Curves and timings](https://www.antonio-ui.com/motion/curves-and-timings.md): Two curves and four durations, the same in Day and Night. - [Moving highlight](https://www.antonio-ui.com/motion/moving-highlight.md): One highlight per control travels to the chosen item, and one per list glides to the row under the pointer. - [Springs (Slider and Switch)](https://www.antonio-ui.com/motion/springs.md): The Slider's thumb springs and its tag sways; the Switch squishes. - [Genie](https://www.antonio-ui.com/motion/genie.md): Menus pour out of their trigger. - [Day and Night](https://www.antonio-ui.com/motion/day-and-night.md): The new theme grows as a circle from the toggle. - [Page transitions](https://www.antonio-ui.com/motion/page-transitions.md): Pages slide in from the side they sit on in their section's list. - [Drum](https://www.antonio-ui.com/motion/drum.md): Words roll, fade and soften by their distance from the active one. - [Tooltip grow](https://www.antonio-ui.com/motion/tooltip-drop-in.md): Grows from its trigger with a fade, on glass, as every popup does. - [Ticks ripple](https://www.antonio-ui.com/motion/ticks-ripple.md): Scroll ticks arrive from where the reader is and leave from the ends. - [Sidebar give back](https://www.antonio-ui.com/motion/sidebar-give-back.md): The page takes the sidebar's space back as it closes. - [Resizable snap](https://www.antonio-ui.com/motion/resizable-snap.md): Resizable learns the widths it is let go at, and holds there. - [Spinners](https://www.antonio-ui.com/motion/spinners.md): Six looks, Dots by default, in the colour of the text around them. - [Reduced motion](https://www.antonio-ui.com/motion/reduced-motion.md): With reduced motion on, nothing travels, springs or slides; changes still fade so they stay visible. - [Overlay entrances](https://www.antonio-ui.com/motion/overlay-entrances.md): Every popup grows from its trigger, Dialog opens in 150 and toasts pour out of the corner and slide back out to the right. - [Animated icons](https://www.antonio-ui.com/motion/animated-icons.md): Icons whose own parts move once on hover or focus: the header's four tabs and the copy to capture swap, and the rule for where they may go. ## Blocks Ready-made screens, each one file made only of António pieces and tokens. Add one: ```sh npx antonio-ui add ``` App blocks fill their parent (App Shell, or a centred screen), so a page renders one in a full-height parent: `
`. Site blocks are sections and size to their content. - [Sign in](https://www.antonio-ui.com/blocks/sign-in.md): Sign in, sign up and reset password: the mark and a list of links beside a 400 wide form, centred in the window; an error on a wrong password. - [Settings](https://www.antonio-ui.com/blocks/settings.md): Settings in the App Shell (Strip): the sections in the top row's switcher, a 400 wide form centred under it, Save at its foot, Delete behind an Alert Dialog. - [Table with filters](https://www.antonio-ui.com/blocks/table-with-filters.md): A list page in the App Shell (Strip): the top row, the controls row, the framed table with status tags; a row opens the right panel, New booking the takeover. - [Dashboard header](https://www.antonio-ui.com/blocks/dashboard-header.md): An overview in the App Shell (Strip): six metric tabs, the chosen one over time as a heatmap, and the recent bookings. - [Empty states](https://www.antonio-ui.com/blocks/empty-states.md): A list page in the App Shell (Strip) with nothing to show: first run, no results after a filter, and an error, each message in a box in the middle of the panel. - [Site nav](https://www.antonio-ui.com/blocks/site-nav.md): The top of a site: the brand, four links with the current one marked, one action; on a phone the links fold into a Sheet. - [Footer](https://www.antonio-ui.com/blocks/footer.md): The end of a site: the brand and one line, three columns of quiet links, the small print under a rule. - [Section header](https://www.antonio-ui.com/blocks/section-header.md): The head of a part of a page: a title, one short line and an optional action, on the start side or centred. - [FAQ](https://www.antonio-ui.com/blocks/faq.md): A Section header and six questions in an Accordion, in one column or beside the header on wide screens. - [Feature grid](https://www.antonio-ui.com/blocks/feature-grid.md): A Section header and six plain Cards, three across, each with an icon or a picture on top. - [Steps](https://www.antonio-ui.com/blocks/steps.md): A Section header and how something works in four numbered steps, across on wide screens, down on a phone. - [Pricing](https://www.antonio-ui.com/blocks/pricing.md): A Section header with a monthly or yearly switch, three plans as plain Cards, the popular one marked. - [Right panels](https://www.antonio-ui.com/blocks/right-panels.md): App Shell's docked panel beside the bookings table, in fourteen kinds (a booking, a student, activity, comments, a form, filters, an inspector, a file, a selection, revenue, logs, access, an instructor, a cancel), each in seven states.