ray·elements · components
Components
79 web components for any app: a live example, its code in HTML, React and Vue, and its API generated from its component.toml.
- 79 components
- 8 categories
- 3 ways to write them: HTML, React, Vue
- All on one page
- llms.txt for AI agents
Buttons
5Actions, on their own or grouped, with an icon or a pressed state.
ButtonA button, or a link styled as one with href.
<ray-button>
Button groupButtons joined into one control: inner corners squared, borders overlapped.<ray-button-group>
Icon buttonA square button for an icon (Mantine's ActionIcon).<ray-icon-button>
ToggleA two-state button (aria-pressed): bold in a toolbar, mute, favorite.<ray-toggle>
Toggle groupray-toggle elements with one shared value: type="single" (at most one on: alignment, view mode) or "multiple" (bold / italic / underline).<ray-toggle-group>
Inputs
22Form fields that take part in a <form>: name, value, validation.
Avatar picker (Profile picture, Photo picker)A profile picture field: a ray-avatar (the initials of display-name without a picture), Choose photo / Change photo and Remove photo, and a sheet with a ray-image-crop to frame the chosen image in a circle before it is kept.
<ray-avatar-picker>
CheckboxA checkbox with label, description and error.<ray-checkbox>
Checkbox groupSeveral choices among options (Mantine's Checkbox.Group): a label, description and error around ray-checkbox elements; the value is the array of the checked ones.<ray-checkbox-group>
Color pickerPick a color: an inline picker (saturation area, hue, opacity, swatches) and a text field with the picker in a dropdown and an eyedropper.<ray-color-picker> <ray-color-input>
Combobox (Multi select)A select you can type in, an autocomplete (Mantine's searchable Select and MultiSelect; for free-form tags, ray-tags-input): typing filters the options; multiple keeps chips; creatable adds new values; clearable, max-values, groups, a result limit.<ray-combobox>
Date pickerA date field with a calendar dropdown, and the calendar on its own.<ray-date-picker> <ray-calendar>
File uploadA drop zone to pick files: drag, click, keyboard or paste.<ray-file-upload>
Image cropFrame an image in a rectangle or a circle of a fixed aspect, by dragging, pinching, the wheel or the keyboard, and export the framed part at a chosen size as a Blob or a data URL.<ray-image-crop>
InputA text field with label, description and error (Mantine's TextInput).<ray-input>
Knob (Rotary, Dial, Potentiometer)A rotary control (a mixer's gain or pan, an effect's amount): drag up or down, the wheel or the arrow keys turn it, a double click puts it back; a log scale for frequencies, a bipolar arc for pan.<ray-knob>
Mode inputA text field with a menu of modes on one side: choosing a mode applies its attributes to the field (type, placeholder, inputmode, pattern…), so one control says what a value is and the value — a file path or text, an amount in € or $, a search by name or ID.<ray-mode-input>
Number inputA number field (Mantine's NumberInput): + and − buttons (hold to repeat), arrow keys, min, max and step, fixed decimals, a prefix and a suffix, a thousands separator, or a duration (m:ss).<ray-number-input>
Password inputA password field with a button that shows or hides what was typed (Mantine's PasswordInput).<ray-password-input>
Path input (File path, Folder picker)A field for a path on disk: a file to open, a folder, or where to save.<ray-path-input>
Radio groupOne choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control.<ray-radio-group> <ray-radio> <ray-radio-card>
SearchA search box: icon, clear button, an optional shortcut that focuses it, and a debounced ray-search event.<ray-search>
Segmented controlOne choice among a few, as a segmented row with a sliding indicator.<ray-segmented-control>
SelectA select with its own dropdown (keyboard, typeahead, groups); options from child <option> elements or the data property.<ray-select>
Slider (Range, Fader)A native range input (keyboard, touch and screen readers as usual) with label, value display and marks; horizontal or vertical (a fader), with a round thumb or a mixing desk's cap (and a fader's gestures), linear or on a fader's dB curve.<ray-slider>
SwitchAn on/off toggle with the same API as Checkbox, announced as a switch.<ray-switch>
Tags input (Tag input, Chips input, TagsInput)Free-form tags with the suggestions in view (Mantine's TagsInput; to pick from a fixed list, ray-combobox): what is typed becomes a tag on Enter, a comma or leaving the field; the suggestions are buttons under the field, filtered as you type, one click adds one.<ray-tags-input>
TextareaA multi-line text field that can grow with its content.<ray-textarea>
Navigation
8Moving around an app: links, tabs, pages, the side bar.
Bottom navThe bottom navigation of a phone app (Material's navigation bar, the iOS tab bar): three to five destinations with an icon, a label and a badge, the current one marked by a pill.
<ray-bottom-nav> <ray-bottom-nav-item>
BreadcrumbsWhere a page sits (Mantine's Breadcrumbs, the WAI-ARIA breadcrumb pattern): links in a labelled nav, the last one the current page.<ray-breadcrumbs> <ray-breadcrumb>
Document tabsThe tabs of open documents (an editor's, a browser's): closable, with an unsaved mark, all over one shared panel; WAI-ARIA tabs with arrows, Home/End and Delete to close.<ray-doc-tabs> <ray-doc-tab>
Nav linkA sidebar/navigation item: icon, label, description, badge, active state, and nested nav links that collapse under it.<ray-nav-link>
PaginationPage navigation: previous/next, optional first/last, page numbers with ellipses; the number of items stays constant so it does not jump.<ray-pagination>
SidebarThe side navigation of an app shell: header, content and footer; on wide screens it collapses to an icon rail (or out of view), below a breakpoint it becomes an off-canvas drawer.<ray-sidebar> <ray-sidebar-group>
StepperA task in steps (Mantine's Stepper): a wizard, a checkout, an onboarding.<ray-stepper> <ray-step>
TabsTabs and panels (WAI-ARIA tabs pattern): arrows, Home/End, automatic or manual activation.<ray-tabs> <ray-tab> <ray-tab-panel>
Overlays
6Above the page: modals, drawers, menus, popovers, the command palette.
Command paletteSearch and run actions from the keyboard (Mantine's Spotlight): fuzzy search, groups, shortcuts, ⌘K / Ctrl+K; combobox + listbox pattern in a modal dialog.
<ray-command-palette>
Dialog (Modal)ray-elements's modal, on the native <dialog>: top layer, the rest of the page inert, focus trapped and restored, stackable.<ray-dialog>
DrawerA panel sliding in from an edge: a RayDialog (focus, Escape, persistent, data-dialog-close, returnValue) with another look; modeless for side panels that keep the page interactive.<ray-drawer>
MenuA dropdown menu (menu button pattern: arrows, Home/End, typeahead, Enter, Escape) or, with context, a context menu at the pointer.<ray-menu> <ray-menu-item> <ray-menu-label> <ray-menu-divider>
PopoverA floating panel anchored to a trigger, in the top layer; closes on Escape and outside clicks.<ray-popover>
TooltipA short hint on hover and focus of its child; the label also becomes the child's accessible description.<ray-tooltip>
Data display
15Content and data: tables, stats, code, media, badges.
AccordionCollapsible sections (WAI-ARIA accordion pattern); one open at a time, or several with multiple.
<ray-accordion> <ray-accordion-item>
AttachmentA file in a composer, upload list or chat: thumbnail or type icon, name, size, upload progress, error, remove and download.<ray-attachment> <ray-attachments>
AvatarAn image, the initials of a name, or a placeholder icon.<ray-avatar>
BadgeA short status label.<ray-badge>
BlockquoteA quotation set apart from the text (Mantine's Blockquote): a colored edge, a quote mark on it and the attribution below.<ray-blockquote>
CarouselSlides in a scroll-snap viewport: native swipe and scrolling, previous/next controls, indicators, keyboard, loop and autoplay with a pause button.<ray-carousel>
CodeA block of source code: header with file name and language, copy button, line numbers, highlighted lines, diff lines, wrapping and a "show more" height.<ray-code>
IconAn icon of the registry: the whole set (the components' too) changes with setIcons().<ray-icon>
IndicatorA dot or a small label on the edge of any element (Mantine's Indicator): "New" on an avatar, an unread count on a bell, an online dot.<ray-indicator>
KbdA keyboard key: a raised keycap, or a flat chip (filled or outline) for hints in menus and buttons.<ray-kbd>
Meter (Level meter, VU meter, Peak meter)An audio level meter (a mixer's channel strip): peak and RMS in dB, green, yellow and red zones, a peak hold line and a clip mark, one bar per channel; setLevels() on every animation frame costs no render.<ray-meter>
QR code (QR, Barcode, 2D code)A QR code of a text or a link (to open on a phone, pair a device, set up two-step sign-in), drawn as one SVG path: sharp at any size and in print.<ray-qr>
StatA metric tile: label, value, change against a previous period, note.<ray-stat>
TableA data table from columns and data: sorting (aria-sort), row selection, clickable rows, sticky header, striped, empty state.<ray-table>
TimelineEvents in order along a line (Mantine's Timeline): activity, history, a deploy's stages.<ray-timeline> <ray-timeline-item>
Feedback
9What the app says back: alerts, notifications, progress, loading.
AlertAn inline message: title, text, an icon of the registry, the color variants and an optional close button.
<ray-alert>
Empty stateWhat a list, table or pane shows when it is empty: icon, title, text and the action that fills it.<ray-empty-state>
NotificationToasts: notify(), updateNotification(), hideNotification(), clearNotifications(); shown in a ray-toaster (a polite live region in the top layer).<ray-notification> <ray-toaster>
ProgressA determinate or (without value) indeterminate progress bar, announced as a progressbar.<ray-progress>
PulseAn indeterminate wait indicator softer than the spinner: circles that breathe or ripple, announced as a status.<ray-pulse>
Ring progressProgress as a ring (Mantine's RingProgress), with content in the middle: a countdown, a goal, an upload.<ray-ring-progress>
SkeletonA placeholder while content loads: a shimmering block, a circle or text lines; with loaded it shows its content.<ray-skeleton>
SpinnerAn indeterminate loading indicator, announced as a status.<ray-spinner>
Step dotsA row of dots, one per step: done, current, to do.<ray-step-dots>
Layout
13The frame of an app and of its content: the shell and its bars, stacks, groups, grids, cards, scrolling.
App barThe top bar of a phone screen (Material's top app bar, the iOS navigation bar): back or menu, a title and subtitle, actions, and an optional row under it.
<ray-app-bar>
App shellThe frame of an app (Mantine's AppShell): header, navbar, main, aside and footer on wide screens; on phones one column with a bottom bar.<ray-app-shell>
Aspect ratioA box with a fixed width/height ratio; its image, video or iframe fills it.<ray-aspect-ratio>
CardA surface for grouped content, with optional media, header and footer.<ray-card>
CenterIts content centered on both axes (Mantine's Center): empty states, loaders, a sign-in card.<ray-center>
ContainerIts content centered, up to a maximum width, with side padding (Mantine's Container): the column of a page.<ray-container>
GridA responsive grid: a column count per width (cols="1 sm:2 lg:4") measured on the grid itself, or as many columns of a minimum width as fit.<ray-grid>
GroupIts children in a row (Mantine's Group): spaced by the space scale, centered, wrapping when they do not fit.<ray-group>
Scroll areaA box that scrolls its content with the native scrolling and a thin themed scrollbar (Mantine's ScrollArea).<ray-scroll-area>
SeparatorA horizontal or vertical rule, optionally labeled (Mantine's Divider).<ray-separator>
SplitTwo panes with a draggable, keyboard-accessible divider (window splitter pattern); one pane has the size (the start one, or the end one with fixed="end": a docked inspector), which can be remembered.<ray-split>
StackIts children in a column, spaced by the space scale (Mantine's Stack): forms, panels, anything stacked.<ray-stack>
Status barThe bar at the bottom of an app window: items on the left and on the right; items with action are buttons.<ray-statusbar> <ray-statusbar-item>
Theme
1Light, dark or the system's choice.