# Components

> Part of Tray UI 0.2.0, a design system in plain HTML and CSS (MIT licence). Every page: https://trayui.com/llms.txt

108 components in plain HTML and CSS, with one small script for behaviour. Each has a page: a live example, its markup, and when to use it.

## Actions

- [Button](https://trayui.com/components/button.md): A button starts an action; the yellow one is the single most important action in view.
- [Button Group](https://trayui.com/components/button-group.md): A button group is a tray that holds related buttons 4px apart, so they read as one control.
- [Toggle](https://trayui.com/components/toggle.md): A toggle is one button that stays pressed: on is solid ink, off is the resting fill.
- [Toggle Group](https://trayui.com/components/toggle-group.md): A toggle group is the segmented control: a tray of segments where the selected one is solid ink.

## Forms

- [Calendar](https://trayui.com/components/calendar.md): A calendar shows a month as a grid of days and takes one date or a range.
- [Checkbox](https://trayui.com/components/checkbox.md): A checkbox turns one option on or off; a group of them lets several be on at once.
- [Combobox](https://trayui.com/components/combobox.md): A combobox is a field that filters a list as you type and takes one of its options.
- [Date Picker](https://trayui.com/components/date-picker.md): A date picker is a field that opens a calendar and shows the chosen date in words.
- [Field](https://trayui.com/components/field.md): A field is one question in a form: a label, its control, and one line of help or error beneath.
- [File Upload](https://trayui.com/components/file-upload.md): File upload is a tray with a dashed edge that takes files dropped on it or chosen from the device, and lists them underneath.
- [Input](https://trayui.com/components/input.md): An input takes one line of text: a grey fill, 16px corners, 56px tall, no stroke.
- [Input Group](https://trayui.com/components/input-group.md): An input group is one field that also holds an icon, a unit, a prefix or a small button.
- [Input OTP](https://trayui.com/components/input-otp.md): Input OTP takes a short one-time code, one character per cell.
- [Label](https://trayui.com/components/label.md): A label names a control in plain words, above it, in label type.
- [Native Select](https://trayui.com/components/native-select.md): A native select is the browser's own menu in the system's field: the right choice on phones and in long forms.
- [Radio Group](https://trayui.com/components/radio-group.md): A radio group picks exactly one option from a few that are all shown.
- [Select](https://trayui.com/components/select.md): A select picks one option from a short list that opens under its trigger.
- [Slider](https://trayui.com/components/slider.md): A slider picks a number from a range by dragging, when the feel of the value matters more than its digits.
- [Switch](https://trayui.com/components/switch.md): A switch turns one setting on or off, and the change applies at once.
- [Tag Input](https://trayui.com/components/tag-input.md): A tag input takes several short values in one field: each becomes a chip that can be removed, and the caret waits after the last one.
- [Textarea](https://trayui.com/components/textarea.md): A textarea takes several lines of text, in the same fill and corners as an input.

## Navigation

- [Breadcrumb](https://trayui.com/components/breadcrumb.md): A breadcrumb shows where a page sits and leads back up, one level per link.
- [Command](https://trayui.com/components/command.md): Command is a search field over a list of destinations and actions: type a few letters, press Enter.
- [Menubar](https://trayui.com/components/menubar.md): A menubar is the row of menus at the top of a working tool: File, Edit, View.
- [Navigation Menu](https://trayui.com/components/navigation-menu.md): The navigation menu is the header of a site: the wordmark, a strip of links, and one small primary action.
- [Pagination](https://trayui.com/components/pagination.md): Pagination moves through a long list one page at a time.
- [Sidebar](https://trayui.com/components/sidebar.md): A sidebar is the navigation of an application: a tray down the side with groups of links, and the person's account at its foot.
- [Stepper](https://trayui.com/components/stepper.md): A stepper shows where a person is in a short, fixed sequence: the steps as numbered marks over a bar that fills as they go.
- [Tabs](https://trayui.com/components/tabs.md): Tabs switch between views of the same thing: a tray strip of 44px tabs, the current one in solid ink.

## Overlays

- [Alert Dialog](https://trayui.com/components/alert-dialog.md): An alert dialog stops a person before something that cannot be undone, and makes them choose.
- [Context Menu](https://trayui.com/components/context-menu.md): A context menu opens where something is right-clicked and offers the actions for that thing.
- [Dialog](https://trayui.com/components/dialog.md): A dialog asks for one decision or one small task in a panel over the page, and holds the page still until it is done.
- [Drawer](https://trayui.com/components/drawer.md): A drawer is a panel that rises from the bottom edge: the dialog of a phone.
- [Dropdown Menu](https://trayui.com/components/dropdown-menu.md): A dropdown menu is a short list of actions that opens from a button.
- [Hover Card](https://trayui.com/components/hover-card.md): A hover card previews what is behind a link when the pointer rests on it: a person, an order, a note.
- [Popover](https://trayui.com/components/popover.md): A popover is a small panel that opens beside the button that asked for it, for a few controls or a short explanation.
- [Sheet](https://trayui.com/components/sheet.md): A sheet is a panel that slides in from the side and keeps the page in view beside it.
- [Tooltip](https://trayui.com/components/tooltip.md): A tooltip is one short line that names a control when the pointer or the keyboard is on it.

## Feedback

- [Alert](https://trayui.com/components/alert.md): An alert is a message that stays in the page until its cause is gone: a tray row with an icon tile, a title and a sentence.
- [Banner](https://trayui.com/components/banner.md): A banner is one line across the top of a page or a section, about the whole product or the whole account: a trial that is ending, planned maintenance, a payment that failed.
- [Empty](https://trayui.com/components/empty.md): An empty state fills the place where content will be: an icon tile, a title, one sentence, and the action that makes the first item.
- [Progress](https://trayui.com/components/progress.md): A progress bar shows how much of a known whole is done: an 8px pill in track, filled in ink.
- [Skeleton](https://trayui.com/components/skeleton.md): A skeleton holds the place of content that is loading, in the shape of what will arrive.
- [Spinner](https://trayui.com/components/spinner.md): A spinner says that something is in progress and its length is unknown.
- [Toast](https://trayui.com/components/toast.md): A toast confirms that something just happened, in a small panel at the corner of the screen that leaves by itself.

## Data

- [Chart](https://trayui.com/components/chart.md): A chart turns figures into thin marks on a quiet frame: a value axis in tick type, hairline gridlines, a strong baseline, a tooltip, and the same figures as a table.
- [Data Table](https://trayui.com/components/data-table.md): A data table is a Table that can be searched, sorted, selected and paged.
- [Table](https://trayui.com/components/table.md): A table sets figures in rows and columns: hairline rows, quiet heads, numbers aligned on the right.

## Layout

- [Aspect Ratio](https://trayui.com/components/aspect-ratio.md): Aspect ratio keeps a box in a fixed proportion while its width changes, so media never shifts the layout as it loads.
- [Carousel](https://trayui.com/components/carousel.md): A carousel is one row of cards that scrolls sideways and snaps to each card.
- [Direction](https://trayui.com/components/direction.md): Direction is how the system follows the reading direction of the language: set dir="rtl" and every component mirrors.
- [Resizable](https://trayui.com/components/resizable.md): Resizable splits a box into two panes with a handle between them that can be dragged.
- [Scroll Area](https://trayui.com/components/scroll-area.md): A scroll area keeps a long list or a wide row inside a fixed box, with a thin scrollbar in the system's rule colour.
- [Separator](https://trayui.com/components/separator.md): A separator is the one rule in the system: a 1px line in hairline.

## Display

- [Accordion](https://trayui.com/components/accordion.md): An accordion is a list of questions that open one at a time: hairline rows, a bold question, a plus tile that turns into a cross.
- [Avatar](https://trayui.com/components/avatar.md): An avatar stands for a person or a team: a softly squared tile with a photo or initials.
- [Badge](https://trayui.com/components/badge.md): A badge states one fact about the thing beside it in a word or two. It is not a control.
- [Card](https://trayui.com/components/card.md): A card is a tray: a grey surface with 40px corners that groups what belongs together. Fill alone sets it apart.
- [Collapsible](https://trayui.com/components/collapsible.md): A collapsible shows and hides one block of detail under a short trigger.
- [Description List](https://trayui.com/components/description-list.md): A description list sets out the facts about one thing as pairs: the name of the fact in soft ink at the start edge, its value beside it, a hairline between rows.
- [Item](https://trayui.com/components/item.md): An item is one row of a list: a media tile, a title with a line of detail, and something at the end.
- [Kbd](https://trayui.com/components/kbd.md): Kbd shows a key of the keyboard as a small cap in the mono face.
- [Lightbox](https://trayui.com/components/lightbox.md): A lightbox shows the pictures of a gallery one at a time, as large as the window allows, over the whole page.
- [Typography](https://trayui.com/components/typography.md): One grotesque, Onest, in two voices: weight 700 with tight tracking for anything that names, weight 400 with open leading for anything that explains.
- [Video Player](https://trayui.com/components/video-player.md): A video player is a film with the system's controls under it: play, the place in the film, captions, sound and full screen.

## Conversation

- [Attachment](https://trayui.com/components/attachment.md): An attachment is a file or an image that travels with a message: a small tray with a tile, a name and one line about it.
- [Bubble](https://trayui.com/components/bubble.md): A bubble is the surface of a message: a soft block of fill around what was said.
- [Code Block](https://trayui.com/components/code-block.md): A code block sets code apart from prose: a tray in the mono face with a header that names it and copies it.
- [Marker](https://trayui.com/components/marker.md): A marker is a line in a conversation that is not a message: a date, a status, something the system did.
- [Message](https://trayui.com/components/message.md): A message is one row of a conversation: who spoke, what they said, and what happened to it.
- [Message Scroller](https://trayui.com/components/message-scroller.md): The message scroller is the window a conversation lives in: it keeps the newest message in view, and steps aside when the reader scrolls back.
- [Questionnaire](https://trayui.com/components/questionnaire.md): A questionnaire asks a few questions one at a time, when an assistant or a flow needs answers before it can go on.
- [Trace](https://trayui.com/components/trace.md): A trace shows what an agent did on the way to an answer: one line per step, with its state and how long it took.

## App shell

- [App Shell](https://trayui.com/components/app-shell.md): The app shell is the frame of a product: the sidebar on a tray at the start edge, the top bar over the content, and one centred column for the page.
- [Filter Bar](https://trayui.com/components/filter-bar.md): The filter bar sits over a list or a table: search at the start, filters as menus, sorting and the view at the end, and a chip for every filter that is on.
- [Notification Center](https://trayui.com/components/notification-center.md): The notification centre is the panel behind the bell: what happened while you were away, newest first, unread ones marked and counted on the bell.
- [Page Header](https://trayui.com/components/page-header.md): The page header names the page: its title in title, one line about it, the page's actions at the end edge, and tabs for its sections underneath.
- [Top Bar](https://trayui.com/components/top-bar.md): The top bar is the row above the content: where you are at the start edge; search, notifications and the account at the end edge.
- [User Menu](https://trayui.com/components/user-menu.md): The user menu opens from the avatar at the end of the top bar: who is signed in, then the account's pages, the theme, help and signing out.
- [Workspace Switcher](https://trayui.com/components/workspace-switcher.md): The workspace switcher is the button at the top of the sidebar that says which workspace you are in and opens the list of the others.

## Metrics

- [Activity Feed](https://trayui.com/components/activity-feed.md): An activity feed is the record of who did what, newest first: a mark, one sentence and the time for each event, joined by a hairline.
- [Stat Card](https://trayui.com/components/stat-card.md): A stat card shows one number that matters: what it counts, the figure, how it moved, and optionally the line of its last weeks.
- [Uptime](https://trayui.com/components/uptime.md): Uptime shows whether a service is working now and how it did over the last 90 days: its state in words, a bar per day, and the share of time it was up.
- [Usage Meter](https://trayui.com/components/usage-meter.md): A usage meter shows how much of a plan's allowance is used: a Progress bar per limit, the numbers in words, and a note once a limit is near.

## Billing

- [Billing Summary](https://trayui.com/components/billing-summary.md): The billing summary opens the billing page: the plan the workspace is on, what it costs and when it renews on an ink card, with the facts of the next invoice beside it.
- [Checkout Summary](https://trayui.com/components/checkout-summary.md): The checkout summary is the card beside a payment form: what is being bought, line by line, a place for a promo code, the total in the largest type, and the button that pays.
- [Invoice List](https://trayui.com/components/invoice-list.md): The invoice list is the table of past invoices: number, date, amount, whether it was paid, and a button to download each.
- [Payment Method](https://trayui.com/components/payment-method.md): Payment method lists the cards on file as choices, marks the one that is charged, and takes a new card in three fields.
- [Plan Comparison](https://trayui.com/components/plan-comparison.md): The plan comparison is the full table under the pricing cards: every feature as a row, every plan as a column, a check, a dash or a number in each cell.
- [Pricing Table](https://trayui.com/components/pricing-table.md): The pricing table sets the plans side by side: a card each with the name, the price as the largest thing on it, who it is for, one button, and what is included. One plan is yellow.
- [Upgrade Prompt](https://trayui.com/components/upgrade-prompt.md): An upgrade prompt stands where a feature would be when the plan does not have it: what the feature does, which plan has it, and one button to get it.

## Account

- [API Keys](https://trayui.com/components/api-keys.md): API keys lists the keys of a workspace with the secret masked, and shows a new key in full once, at the moment it is made.
- [Auth Form](https://trayui.com/components/auth-form.md): The auth form is the card a person meets before the product: sign in, create an account, or ask for a new password. One column, one yellow button.
- [Integration Card](https://trayui.com/components/integration-card.md): An integration card stands for one outside service the product can work with: its mark, its name, what connecting it does, and the control that connects it.
- [Invite Form](https://trayui.com/components/invite-form.md): The invite form takes several emails at once, a role for all of them, and sends the invitations.
- [Notification Preferences](https://trayui.com/components/notification-preferences.md): Notification preferences is a grid of checkboxes: what can happen down the side, the ways to be told across the top.
- [Settings Section](https://trayui.com/components/settings-section.md): A settings section is one topic of a settings page: its name and a line of explanation in a narrow column at the start edge, its controls on a card beside it.
- [Team Members](https://trayui.com/components/team-members.md): Team members is the table of people in a workspace: who they are, their role, whether they have joined, and when they were last seen.

## Onboarding

- [Changelog](https://trayui.com/components/changelog.md): The changelog tells people what changed in the product: one entry per release, the date at the start edge, a title, a tag for the kind of change, and a short list.
- [Cookie Consent](https://trayui.com/components/cookie-consent.md): Cookie consent is a raised panel in the corner of the first visit: what is stored and why, and three equal ways to answer.
- [Feedback Widget](https://trayui.com/components/feedback-widget.md): The feedback widget asks one question with a row of numbers, then offers a box for the reason, then says thanks.
- [Onboarding Checklist](https://trayui.com/components/onboarding-checklist.md): The onboarding checklist gets a new workspace to its first real result: a short list of tasks, the next one opened with its button, a bar that fills as they are done.
- [Tour](https://trayui.com/components/tour.md): A tour points at parts of a screen one at a time: a small raised panel beside the part, with a count, a sentence or two, and "Next".

## Marketing

- [Call to Action](https://trayui.com/components/call-to-action.md): The call to action closes a page: one yellow card with the offer in a headline and the button that takes it.
- [Feature Grid](https://trayui.com/components/feature-grid.md): The feature grid tells what the product does in a few cards of unequal size: each one a small icon tile, a title, and two lines.
- [Footer](https://trayui.com/components/footer.md): The footer ends every public page: the name and a line about the product, the site's links in columns, and a last row for the legal lines.
- [Hero](https://trayui.com/components/hero.md): The hero is the first screen of a product's public page: what it is in one headline, one sentence, one yellow button, and something real to look at beside them.
- [Testimonial](https://trayui.com/components/testimonial.md): A testimonial is a customer's own sentence about the product, set large, with who said it underneath.
