Component reference
Supply UI, part by part
Supply UI is a free design system for apps, sites and tools: tokens, plain CSS classes and React components that your project owns as source files, built on UI SDK from Vercel. Its whole look is a few choices, set in one place. Here is every part of it, with its options, its code and examples that work.
What you get
- Tokens
- CSS variables for colour, type, space, corners and motion: one place decides the whole look
- A few choices
- One brand colour, the greys, the corners, the size. Every other colour is worked out from them, so one choice changes everything.
- Light and dark
- Both in the same file. Nothing to write twice.
- Classes
ui-btn,ui-card,ui-inputon plain HTML: any stack, no JavaScript- React components
- Built on UI SDK, Vercel’s open library of interface behaviours, with the same classes underneath. The keyboard, focus and screen readers already work, every change is recorded with who made it, and an AI assistant can use the app.
- Icons
- Lucide line icons that follow the look’s colour and line weight
- Patterns
- Painted pictures made from a word, in the look’s colours: a cover or a person never needs a stock photo
- Fonts
- Two open pairs to pick between: Inter with Reddit Mono, or DM Sans with Courier Prime
Everything is MIT, ISC or OFL licensed. The files are copied into your project, so there is nothing to buy and nothing that depends on Supply Family being online.
Start
src/components/ui/npx https://supply.family/ui/cli.tgz initimport { Button } from '@/components/ui';
<Button variant="primary">Save</Button>Later, update in place of init takes a newer kit without losing your edits. Building with an AI? Give it the guide: the install steps, the rules every screen follows and how to set the look. Every page here is also a text file for it. Not React? Take the stylesheet alone and use the classes each page lists.
Every component
146 components, by what they are for, with 60 parts that go inside them. Each has a page: a preview that works, its code, its options, the classes for plain HTML and the examples that use it. The pages are made from the code, so they are never out of date.
Layout
width, with room at the sidesGridAs many equal columns of at least min as fitItem textA name and a line under it: a person and their role, a product and its priceMainThe main part of an AppShell, beside its Sidebar, with the page's room round itNavLinks to the sections of a toolPage headerThe top of a screen: its title on the left and its actions on the rightPage transitionMakes going to this page smooth: the page you leave fades out and this one fades and rises in, while the app's sidebar,…RowThings next to each other, lined up on their middles; it wraps onto more lines where they do not fitSeparatorA line between two groupsSidebarThe side column and the main part of an AppShellSite pageOne page of a site: the header, the page and the footer in the page column, with the room around them settled onceSplitA side part and a main part next to each other (a sidebar and its page, a rail and its list)StackThings under each other, spaced by gap rather than by margins on the childrenActions and forms
<Checkbox value="…">s inside, and the group holds the values that are tickedChip buttonA chip that is a button: a filter that is on (pressed) or offChoiceA radio or a checkbox as a whole card: a plan, a delivery method, an option worth a line of explanationCode inputA code typed one character per box: a verification code, a PINColour pickerPick any colour: drag in the square, move the hue, or type a valueComboboxA dropdown you can type in to find an optionCopy buttonCopies a text (a link, a code, a command) and says soDate inputA date typed one part at a time (day, month, year), in the order the person's language writes it: for dates people know…Date pickerA field to type a date in, with a calendar to pick it fromFieldA label, a control, and a hint or an error under itFieldsetA named group of fieldsFile dropA box to drop files on, paste them into, or choose them with a buttonForm rowA settings row: what it is on the left, the control on the rightImage cropperChoose the part of a picture to keep: drag the frame, pull its corners, zoom, turn, mirrorInputA one-line text fieldInput groupA field with something inside it: an icon, a unit, a small buttonListboxOptions that stay in view, to choose one or several (multiple): like a dropdown that is always openMulti comboboxSeveral options chosen by typing: each becomes a chip in the field, with a cross to take it awayMulti selectA dropdown for choosing several options: each press ticks or unticks one, and the list stays openNative selectThe browser's own select, drawn to matchNumber inputA number with minus and plus buttons: a quantity, a count of seatsPassword inputA password field with a button to show what was typedRadioOne choice inside a <RadioGroup>Radio groupOne of severalRange sliderA slider with two ends, for a range: a price from–to, opening hoursRatingStars to give a score, or to show one (readOnly, where any number shows, like 4.2)Resizable handleThe bar between two panelsResizable panelsPanels side by side (or stacked, with orientation="vertical") that the person resizesSearch inputA search field with its iconSegmentedTwo to five choices side by side, one always chosen (a view switch, a period)SelectA designed dropdown for choosing one optionSliderA slider for one numberSortableA list the person puts in order by dragging rows, or with the keyboard: Space picks a row up, the arrows move it, Space…SwitchA setting that is on or off and takes effect at onceTextareaA text field for several lines: a note, a messageTime inputA time of day typed one part at a time, on the clock the person's language usesToggleA button that stays on or off: pin, mute, boldToggle groupToggles that share one value: text styles, a view switcherToken inputText with tokens in it: people mentioned in a message, files attached to a prompt, tagsTreeThings inside things: folders and files, categories and sub-categoriesTrigger inputA plain text field that suggests at the caret when a trigger is typed: "@" for people, "/" for commands, "#" for tagsShowing things
ratio="4 / 3"AvatarA person's pictureAvatar groupAvatars side by side, overlappingBadgeA status word on a thing: "Paid", "Draft", "Overdue"BannerA message across the top of the page: a notice, a trial endingBarsA small bar chartBreadcrumbWhere this page sits: the pages above it, as links, ending with the page itselfCardOne thing lifted out of the page: an item a person picks or acts on (a room, an order), or one task (a form, a group of…Card coverA painted picture at the top of a <Card>CarouselA row to swipe throughCellsA row of <Cell>s: small facts side by side under a figure or a titleChecklistRules or steps that tick themselves: a password's rules, a setup's stepsChipA pill for a category or a tag, with an optional iconChip removeThe small "×" inside a <Chip> that takes it awayCode blockA block of code or a commandCollapsibleOne thing that opens and closes ("Advanced options")Command paletteSearch for a page or an action and run it from the keyboardCountA count on a tab, a nav item or a bellCoverA picture filling a band, the whole width of the window, with a solid panel over it that holds the words: the top of a…Description listFacts about one thing: name on the left, value on the right, a hairline between the rowsDividerA line with a word in the middle: "or"EmptyWhat a list shows when there is nothing in it yetFigureOne very large, light number: the main fact of a cardInsetA quieter panel inside a card, for a second group of contentListRows with a line between them: settings, people, filesLogoThe site's logoMenuA list of actions on a thing that opens from a button: the "⋯" of a rowMenu contentThe list of a Menu, opened next to its trigger; put MenuItems insideMenubarThe menus of an application in one row: File, Edit, ViewMeterA reading within a known range: storage used, seats taken, a quotaNavigation menuA site's main links in a row, with panels of links that open under a label on hover, press or the arrow keysPaginationPages of a list: previous, a few numbers, nextPatternA painted picture for places where the tool has no image: a card cover, a banner, an empty statePattern avatarA person or a thing without a photo: a small painted circle, always the same for the same namePick tileA picture to pick: photos to keep, a cover to usePictureA picture that stands on its own, with the kit's corners: in a section of a page, in a carousel, beside textProgressHow far a task has come: an upload, an exportProseLong text that came as plain HTML (a help page, an article): headings, lists, quotes, code and links get the system's…RingA ring that fills up: a share, a progress, a scoreScroll areaA box that scrolls inside the page, with scrollbars drawn to match and a soft fade where there is moreSite headerThe header of a site or a public page: the brand, the main links and an action or two in one lineSite menuA site's menu on a small screen: a two-line button that opens a floating panel from the end of the screen, with the…SkeletonA grey shape that stands in for content while it loads; size it like what it replacesSort headerA column heading that sorts the table when pressedSparklineA small line chart, for a trend next to a numberSpinnerSomething is on its wayStatOne number with its label: "Orders / 128 / +12% this week"StepsWhere the person is in a task with a few steps (a checkout, a setup)Tab barThe main sections at the bottom of a phone screen; use it with, or instead of, the sidebarTableA tableTabsViews of one thing that share a place, one shown at a timeTimelineWhat happened, newest first or oldest first: a list of <TimelineItem>ToolbarA row of controls above a list, an editor or a canvasTrendUp or down next to a number: "+12%"WaterfallThings that start and last, as bars on one time axis: a page's requests, the steps of a job, a traceOn top of the page
side is "bottom" (the default), "top", "left",…Hover cardA small card that opens when a link is hovered or focused: a person, a recordMenu checkbox itemA menu row that is on or off: "Show weekends"Menu radio groupOne of several in a menu: "Sort by"Menu radio itemOne choice in a MenuRadioGroup, ticked when chosenNotificationsA list of things that happened: put <Notification>s insidePopoverA small panel that opens from a button and holds content or controls: a filter, a short form, detailsSubmenuA menu inside a menu: a row that opens more rows beside itToasterThe corner where toasts appearTooltipA short hint for an icon buttonAI assistants
Helpers
<body>, when the tool has a <ColorSchemeSwitch>: the person's…Colour scheme switchLets the person using the tool choose light or dark for themselvesIconA Lucide icon in the system's size, colour and line weightKeyboard keyA key or a shortcut written in a sentenceLabelNames any control by its htmlFor, also a slider or a radio group; a press on it moves focus therePreferencesShows preferences on data-* attributes, so CSS styles by them from the first paint: global ones on <html>, the rest…Toast markThe mark of a toast's kind (success, info, warning, error, loading); nothing for a plain messageUI providerThe language of the kit's own words and of its dates and numbers, set once for the whole app, around its content in the…