All components

Every component on one page. Each also has its own page.

Button

A button, or a link styled as one with href. Submits or resets its form with type.

Variants × colors
primarygrayredteal filledButtonButtonButtonButton lightButtonButtonButtonButton outlineButtonButtonButtonButton subtleButtonButtonButtonButton defaultButton——— transparentButtonButtonButtonButton raisedButtonButtonButtonButton

default is the neutral surface and ignores color. Any palette name or CSS color works: color="#8e44ad".

Gradient
Theme gradient pink → orange Raw colors
Sizes
Extra small Small Medium Large Extra large
Radius
xs sm md lg full
Icons, states and links
New file Continue Saving Disabled Link
Full width
Long labels in narrow containers: drag the corner of the box
Another schedule (e.g. a different dose at weekends) Another schedule (e.g. a different dose at weekends)

A label longer than the room ends in an ellipsis; with wrap it breaks into lines.

Code

<ray-button> · RayButton

PropertyAttributeTypeDefaultDescription
variantvariant reflectsfilled | light | outline | subtle | default | transparent | gradient | raisedfilledVisual style. raised: a physical key on a darker edge that sinks when pressed (mouse, touch or keyboard).
gradientgradient reflectsstringWith variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
colorcolorstringA palette color (blue, red…) or any CSS color. Default: the primary color.
sizesize reflectsstringsmHeight, padding and font size: xs…xl or any CSS length (the padding and the font follow).
radiusradiusxs | sm | md | lg | xl | fullCorner radius. Default: --ray-radius-default.
typetypebutton | submit | resetbuttonsubmit/reset act on the enclosing form.
disableddisabledbooleanNot interactive (also when inside a disabled fieldset).
loadingloadingbooleanShows a spinner over the content and blocks clicks.
fullWidthfull-widthbooleanTakes the whole width of its container.
wrapwrap reflectsbooleanA long label breaks into lines and the button grows from its height (min-height: the size's height). Without it, a label longer than the room ends in an ellipsis.
hrefhrefstringRenders a link instead of a button.
targettargetstringLink target, with href.
namenamestringWith type=submit: submitted as name=value.
valuevaluestringWith type=submit: the submitted value.
SlotDescription
(default)The label.
leftIcon or content before the label.
rightIcon or content after the label.
PartDescription
buttonThe inner <button> or <a>.
labelThe label wrapper.

Button group

Buttons joined into one control: inner corners squared, borders overlapped. Works with ray-button, ray-icon-button, menus with a button trigger and fields (ray-input, ray-select, ray-search).

Left Center Right Deploy Deploy to staging Schedule… 100%
Search Top Middle Bottom
Code

<ray-button-group> · RayButtonGroup

role=group; give it a label. The corners come from the --ray-group-radius-* custom properties, which your own components can read too.

PropertyAttributeTypeDefaultDescription
orientationorientation reflectshorizontal | verticalhorizontalDirection of the group.
fullWidthfull-width reflectsbooleanFills its container; the children share the width.
labellabelstringAccessible name (aria-label).
SlotDescription
(default)The buttons, fields or menus to join.

Icon button

A square button for an icon (Mantine's ActionIcon). Always give it a label.

Variants × colors
primarygrayredteal subtle (default) filled light outline default——— transparent raised gradient———

subtle is the icon button's default variant. label is the accessible name and the tooltip.

Sizes
A main action: any CSS length

size takes a length for the big button of a phone screen (start, pause, record); the icon scales with it.

Radius
States and links
Code

<ray-icon-button> · RayIconButton

Same properties as ray-button; variant defaults to subtle.

PropertyAttributeTypeDefaultDescription
labellabel reflectsstringAccessible name and tooltip (required: the button has no text).
variantvariant reflectsfilled | light | outline | subtle | default | transparent | gradient | raisedsubtleVisual style.
gradientgradient reflectsstringWith variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
colorcolorstringA palette color or any CSS color.
sizesize reflectsstringsmWidth and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it.
disableddisabledbooleanNot interactive.
loadingloadingbooleanShows a spinner instead of the icon.
SlotDescription
(default)The icon, centered: a ray-icon or an inline <svg>, both sized to the button (1.15 times its font; --ray-icon-size or the icon's size= override it).
PartDescription
buttonThe inner button.

Toggle

A two-state button (aria-pressed): bold in a toolbar, mute, favorite. The variant is how "on" looks; "off" is always neutral, so the states differ by more than color. Has everything ray-button has and joins a ray-button-group.

Variants · off and on
offonon · teal subtle (default)FavoriteFavoriteFavorite outlineWrap linesWrap linesWrap lines lightMuteMuteMute filledLiveLiveLive raisedPowerPowerPower

Click any of them. Off is always neutral, so on differs by more than color. ray-button's default, transparent and gradient are not toggle variants.

Icon toggles

For toolbars where toggles share one value (bold / italic, alignment), see ray-toggle-group.

Sizes and states
xs sm md lg Disabled on Disabled off

Flip a toggle to see its change event.

Code

<ray-toggle> · RayToggle

Click, Enter or Space flips pressed and fires change. In a form it is submitted like a checkbox: value (default "on") under name while pressed; reset restores the initial pressed attribute.

PropertyAttributeTypeDefaultDescription
pressedpressed reflectsbooleanOn.
variantvariant reflectssubtle | outline | light | filled | raisedsubtleLook of "on": subtle (tint), outline (colored border + tint), light (muted → tint), filled (surface → solid color), raised (a key that latches down, lit). ray-button's default, transparent and gradient are left out: no distinct on state, or only a color change.
squaresquare reflectsbooleanSquare, for an icon alone (give it a label).
labellabel reflectsstringAccessible name and tooltip, for icon-only toggles.
EventDescription
changeThe user flipped it (read `pressed`).
SlotDescription
(default)Text or an icon.

Toggle group

ray-toggle elements with one shared value: type="single" (at most one on: alignment, view mode) or "multiple" (bold / italic / underline). Joined like a button group, or spaced; arrow keys move between toggles; submitted with its form.

Single · one choice, can be cleared
Day Week Month

The second one is required: the selected toggle cannot be turned off.

Multiple · any number
B I U S M T W T F S S
Raised · a row of latching keys
Slow Normal Fast

Change a group to see its change event.

Code

<ray-toggle-group> · RayToggleGroup

Each toggle's value (else its text) is its key. variant, color, size, radius and square reach the toggles that do not set their own. One tab stop (the selected toggle); arrows, Home and End move; Space/Enter flips.

PropertyAttributeTypeDefaultDescription
typetype reflectssingle | multiplesinglesingle: choosing one turns the others off; multiple: each toggle is independent.
valuevaluestringThe selected key (single) or keys (multiple: an array, or a comma-separated attribute).
namename reflectsstringForm field name: the value (multiple: one entry per key).
requiredrequired reflectsbooleanNeeds a value; with single the selected toggle cannot be turned off.
disableddisabled reflectsbooleanDisables every toggle.
spacedspaced reflectsbooleanToggles apart, each with its own corners (default: joined).
variantvariant reflectssubtle | outline | light | filled | raisedVariant of the toggles.
colorcolor reflectsstringColor of the toggles' on state.
sizesize reflectsxs | sm | md | lg | xlSize of the toggles.
radiusradius reflectsstringCorner radius of the toggles.
squaresquare reflectsbooleanSquare toggles, for icons.
EventDescription
changeThe user changed the selection (read `value` or `values`; the toggles' own change events stop at the group).
SlotDescription
(default)ray-toggle elements.

Avatar picker also 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. A bottom drawer on a narrow screen, a dialog otherwise. The value is the framed picture as a data URL, or a Blob with output="blob"; it takes part in a <form>.

Choose a picture, frame it in the circle, use it: the value is a small square JPEG

Choose a picture: its size shows here.

In a form, and disabled
SubmitReset
Code

<ray-avatar-picker> · RayAvatarPicker

Choose photo opens the system picker (on a phone, the camera or the photo library); the chosen image opens in the sheet, framed in a circle, and Use photo makes the framed part, at output-size, the value. Cancel or a picture that cannot be decoded leaves the value as it was (the latter shows failed-label and fires ray-error). edit(file) opens the sheet on an image from elsewhere (a drop, a paste). Styling: the parts, and ::part(crop) for --ray-image-crop-* .

PropertyAttributeTypeDefaultDescription
namename reflectsstringForm field name. The value is submitted as a string (data URL) or, with output="blob", as a file named <name>.jpg (.png, .webp).
valuevaluestringThe picture: a URL or data URL (the value attribute: the initial picture, and what a form reset goes back to), or a Blob. null without one.
outputoutput reflectsdataurl | blobdataurlWhat Use photo makes the value: a data URL (easy to keep in JSON) or a Blob (to upload).
labellabelstringLabel above the avatar and the buttons.
descriptiondescriptionstringHelp text under the label.
errorerrorstringError message; marks the field invalid.
requiredrequired reflectsbooleanA picture is required to submit the form.
disableddisabled reflectsbooleanNo choosing, removing nor preview (also inside a disabled <fieldset>).
readonlyreadonly reflectsbooleanThe picture cannot be changed: the buttons are hidden, the preview still works. Not validated (required does not apply), as a native readonly field.
displayNamedisplay-namestringThe person's name: the avatar shows its initials without a picture (name is the form field).
acceptacceptstringimage/*File types the picker offers.
sizesize reflectsxs | sm | md | lg | xlxlSize of the avatar.
colorcolorstringColor of the avatar's initials (a palette color or any CSS color).
variantvariantlight | filled | outline | defaultlightStyle of the avatar's initials.
radiusradiusxs | sm | md | lg | xl | fullCorner radius of the avatar. Default: full (the crop frames a circle either way; the picture is square).
buttonSizebutton-sizexs | sm | md | lg | xlsmSize of the buttons.
layoutlayout reflectsstack | inlinestackThe buttons one under the other, beside the avatar, or in a row.
sheetsheet reflectsauto | drawer | dialogautoWhere the crop opens: auto is a bottom drawer on a narrow screen (up to 40em) and a dialog otherwise.
outputSizeoutput-sizestring320Side of the square picture kept, in pixels.
typetypestringimage/jpegFormat of the picture kept (PNG where the browser cannot encode it).
qualityqualitynumber0.850…1, for image/jpeg and image/webp.
maxZoommax-zoomnumber4The most zoom of the crop.
pickLabelpick-labelstringChoose photo (text avatar-picker.pick)The button without a picture.
changeLabelchange-labelstringChange photo (text avatar-picker.change)The same button with a picture.
removeLabelremove-labelstringRemove photo (text avatar-picker.remove)The button that removes the picture.
sheetLabelsheet-labelstringAdjust the photo (text avatar-picker.sheet)Title of the crop sheet.
useLabeluse-labelstringUse photo (text avatar-picker.use)The sheet's button that keeps the framed picture.
cancelLabelcancel-labelstringCancel (text avatar-picker.cancel)The sheet's button that leaves the value as it was.
cropLabelcrop-labelstringPhoto framing (text avatar-picker.crop)Accessible name of the crop area.
zoomLabelzoom-labelstringZoom (text avatar-picker.zoom)Name of the zoom slider.
previewpreview reflectsbooleanWith a picture, the avatar is a button (click, Enter, Space): it fires ray-preview and, unless that is canceled, shows the picture large in a dialog. Also with readonly; not while disabled.
previewLabelpreview-labelstringView photo (text avatar-picker.preview)Accessible name of the avatar button and title of the preview dialog.
requiredLabelrequired-labelstringPlease choose a photo. (text avatar-picker.required)Validation message of required without a picture.
failedLabelfailed-labelstringThat image could not be opened. (text avatar-picker.failed)Shown under the field when the chosen file cannot be decoded, or the framed picture encoded (until the next picture).
EventDescription
inputThe value changed (fired with change).
changeA picture was kept (Use photo) or removed. Read value.
ray-previewThe avatar was pressed (with preview and a picture). Cancelable: preventDefault() to do something else than the preview dialog (a menu, an app's own viewer).
ray-errorThe chosen file could not be decoded, or the framed picture encoded; the value is unchanged.
PartDescription
labelThe label.
descriptionThe description.
rowThe avatar and the buttons (role group, named by the label).
viewAround the avatar; a button with preview and a picture.
avatarThe ray-avatar.
actionsThe buttons' column (or row).
pickThe Choose photo / Change photo ray-button.
removeThe Remove photo ray-button.
errorThe error message.
sheetThe ray-drawer or ray-dialog of the crop.
cropThe ray-image-crop.
previewThe ray-dialog of the preview.
preview-imageThe picture in the preview dialog.
cancelThe sheet's Cancel ray-button.
useThe sheet's Use photo ray-button.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
avatar-picker.pickChoose photo
avatar-picker.changeChange photo
avatar-picker.removeRemove photo
avatar-picker.sheetAdjust the photo
avatar-picker.useUse photo
avatar-picker.cancelCancel
avatar-picker.cropPhoto framing
avatar-picker.zoomZoom
avatar-picker.previewView photo
avatar-picker.requiredPlease choose a photo.
avatar-picker.failedThat image could not be opened.

Checkbox

A checkbox with label, description and error. Submits value when checked.

Send me updates (label as content)
Code

<ray-checkbox> · RayCheckbox

PropertyAttributeTypeDefaultDescription
checkedchecked (initial)booleanCurrent state. The checked attribute is the initial state (restored on reset).
indeterminateindeterminate reflectsbooleanMixed state; cleared on the next user change.
valuevalue reflectsstringonSubmitted value when checked.
namenamestringForm field name.
labellabelstringLabel text (or put the label in the content).
descriptiondescriptionstringHelp text.
errorerrorstringError text.
requiredrequiredbooleanMust be checked to submit.
disableddisabledbooleanNot interactive nor submitted.
variantvariant reflectsfilled | outlinefilledChecked look: filled box, or colored border and mark.
colorcolorstringA palette color or any CSS color for the checked state.
sizesize reflectsxs | sm | md | lg | xlsmBox and font size.
labelPositionlabel-position reflectsend | start | right | leftendSide of the label: start/end follow the writing direction; left/right are sides of the screen.
EventDescription
changeWhen the user toggles it.
SlotDescription
(default)Label content.
PartDescription
inputThe native checkbox (transparent, on top of the indicator).
indicatorThe drawn box.
labelThe label.

Checkbox group

Several 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. max caps how many; required asks for one.

In a form: required, one entry per value
Save
max: up to three
Select all (indeterminate)
Sizes, colors and disabled
Code

<ray-checkbox-group> · RayCheckboxGroup

The group is the form control: one entry per checked value under name (like checkboxes sharing a name); the checkboxes inside lose their own name. It stops their change events and fires its own. role="group" named by its label.

PropertyAttributeTypeDefaultDescription
valuevalue (initial)arrayThe checked values. The value attribute: "a,b".
namename reflectsstringForm field name.
labellabelstringGroup label (also its accessible name).
descriptiondescriptionstringHelp text.
errorerrorstringError text.
requiredrequired reflectsbooleanAt least one must be checked.
disableddisabled reflectsbooleanDisables every checkbox.
maxmaxnumberAt most this many: the others are disabled once reached; the label shows the count.
orientationorientation reflectsvertical | horizontalverticalLayout of the checkboxes.
sizesize reflectsxs | sm | md | lg | xlSize of the checkboxes that set none.
colorcolor reflectsstringColor of the checkboxes that set none.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the checkboxes or after them.
EventDescription
changeThe user checked or unchecked one (read value).
inputSame moment as change.
SlotDescription
(default)ray-checkbox elements (also nested in other markup).

Color picker

Pick a color: an inline picker (saturation area, hue, opacity, swatches) and a text field with the picker in a dropdown and an eyedropper. Pointer and keyboard; form-associated; hex, rgb or hsl, with or without alpha.

Picker
#7c3aedDrag the area or the hue, or use the arrow keys.
Formats and opacity
format="rgba"
format="hsla"
format="hexa"
Swatches
picker + swatches
swatches-only
Color input
In a form
bug
Save labelReset
Code

<ray-color-picker>

Keyboard: arrows move the area's thumb (saturation, brightness) or a slider's; Shift for 10× steps; Home/End on the sliders. The alpha slider shows when format has alpha.

PropertyAttributeTypeDefaultDescription
valuevaluestringThe color, written in format. Any color is accepted and rewritten in format. The value attribute is the initial value (restored on form reset).
formatformat reflectsstringhexHow value is written: hex, hexa, rgb, rgba, hsl or hsla. Formats ending in a show the opacity slider.
swatchesswatchesstringPreset colors below the picker: an array, or a comma-separated list in the attribute (commas inside rgb()/hsl() are kept).
swatchesPerRowswatches-per-rownumber7Swatches in each row.
swatchesOnlyswatches-only reflectsbooleanOnly the swatches: no area nor sliders.
sizesize reflectsxs | sm | md | lg | xlmdWidth of the picker and size of its thumbs.
fullWidthfull-width reflectsbooleanTakes the width of its container.
namename reflectsstringForm field name.
disableddisabled reflectsbooleanNot interactive.
labellabelstringAccessible name of the whole picker.
EventDescription
inputThe color moved (every step of a drag).
changeThe color settled: pointer released, a key pressed or a swatch chosen (read value).
PartDescription
saturationThe saturation/brightness area.
hueThe hue slider.
alphaThe opacity slider.
previewThe current color.
swatchesThe swatches' grid.

<ray-color-input>

Type any CSS color (it becomes the value as soon as it is valid; invalid text goes back to the value on blur), or open the picker with a click or ArrowDown. The eyedropper shows only where the browser has the EyeDropper API.

PropertyAttributeTypeDefaultDescription
valuevaluestringThe color, written in format. The value attribute is the initial value (restored on form reset).
formatformat reflectsstringhexHow value is written: hex, hexa, rgb, rgba, hsl or hsla.
swatchesswatchesstringPreset colors in the dropdown (an array, or a comma-separated list).
swatchesPerRowswatches-per-rownumber7Swatches in each row.
placeholderplaceholderstringShown while empty.
hideEyedropperhide-eyedropper reflectsbooleanHides the eyedropper button.
openopen reflectsbooleanThe dropdown is shown.
namename reflectsstringForm field name.
labellabelstringLabel above the field.
descriptiondescriptionstringHelp text.
errorerrorstringError message; marks the field invalid.
requiredrequired reflectsbooleanMust have a color.
disableddisabled reflectsbooleanNot interactive.
sizesize reflectsxs | sm | md | lg | xlsmField height and font size.
radiusradius reflectsstringCorner radius: xs…xl or a CSS length.
variantvariant reflectsdefault | filled | unstyleddefaultVisual style of the field.
descriptionPositiondescription-position reflectsabove | belowaboveWhere the description goes.
EventDescription
inputThe color changed (typing a valid color, or moving the picker).
changeThe color settled (picker released, a swatch, the eyedropper, or the field left with a new color).
ray-openThe dropdown opened.
ray-closeThe dropdown closed.
PartDescription
inputThe text field.
previewThe swatch of the current color.
eyedropperThe eyedropper button.
dropdownThe dropdown with the picker.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
color-picker.saturationSaturation and brightness
color-picker.saturation-valueSaturation {saturation}%, brightness {brightness}%
color-picker.hueHue
color-picker.hue-value{hue} degrees
color-picker.opacityOpacity
color-picker.swatchesSwatches
color-picker.eyedropperPick a color from the screen
color-picker.dropdownChoose a color

Combobox also 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.

Search a long list, with groups
multiple: chips, max-values

Pick, type or remove: the values show here.

In a form, variants and states
Submit
Code

<ray-combobox> · RayCombobox

The WAI-ARIA combobox pattern (a text field with a listbox popup; the active option is aria-activedescendant). Arrows move, Enter picks, Escape closes (then clears with clearable), Backspace in an empty field removes the last chip. The form gets one entry per value. On a touch screen the list opens under the field while the keyboard is up, and little room is left for it: for free-form tags with suggestions (multiple creatable), ray-tags-input keeps them in view with no popup.

PropertyAttributeTypeDefaultDescription
valuevalue (initial)stringThe chosen value; an array with multiple. The value attribute: "a,b" with multiple.
data—arrayOptions instead of child <option>/<optgroup> elements.
multiplemultiple reflectsbooleanSeveral values, shown as chips.
placeholderplaceholderstringShown while empty.
creatablecreatablebooleanWhat was typed can be added when no option matches it ("+ Create …"); fires ray-create.
clearableclearablebooleanA button that clears the value.
maxValuesmax-valuesnumberWith multiple: at most this many.
limitlimitnumberAt most this many options shown (large lists: keep typing).
nothingFoundnothing-foundstringNo matches (text combobox.nothing-found)Shown when nothing matches.
openopen reflectsbooleanThe dropdown is shown.
EventDescription
changeThe value changed (read value).
inputSame moment as change.
ray-createA new value was created from the typed text.
ray-openThe dropdown opened.
ray-closeThe dropdown closed.
SlotDescription
(default)<option> and <optgroup> elements.
PartDescription
inputThe text field.
chipsThe chips container.
chipA chip.
clearThe clear button.
dropdownThe listbox.
optionAn option.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
combobox.clearClear
combobox.removeRemove {label}
combobox.create+ Create “{query}”
combobox.more{count} more: keep typing
combobox.nothing-foundNo matches

Date picker

A date field with a calendar dropdown, and the calendar on its own. Keyboard grid navigation, min/max, locale-aware. Form-associated.

Pick a day.
Full width: the days share the width of the container
Code

<ray-date-picker>

Values are ISO dates ("2026-10-06"), submitted as such. ArrowDown on the field opens the calendar; Escape closes it. On a touch screen the trigger opens the system's picker instead (native).

PropertyAttributeTypeDefaultDescription
valuevaluestringThe chosen date, ISO "YYYY-MM-DD" ("" for none). The value attribute is the initial value (restored on form reset).
minminstringEarliest selectable date (ISO). Earlier days are disabled; an earlier value is invalid (rangeUnderflow).
maxmaxstringLatest selectable date (ISO).
placeholderplaceholderstringPick a date (text date-picker.placeholder)Shown while no date is chosen.
formatformatshort | medium | long | fullmediumHow the date is displayed (Intl dateStyle).
localelocalestringLocale for names and formats. Default: the nearest lang attribute, else the browser's.
firstDayfirst-daynumberFirst day of the week, 0 (Sunday) to 6. Default: the locale's.
clearableclearable reflectsbooleanShows a button that clears the date.
openopen reflectsbooleanThe calendar dropdown is shown.
nativenative reflectsauto | always | neverautoWhich picker the trigger opens: the system's (the native date input's, the usual one on a phone) or the calendar dropdown. auto: the system's on a touch screen (pointer: coarse), else the calendar. A date picked in the system's picker is the value like one picked in the calendar.
namename reflectsstringForm field name.
labellabelstringVisible label (also the accessible name).
descriptiondescriptionstringHelp text.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text.
requiredrequiredbooleanRequired for form submission.
disableddisabledbooleanNot interactive nor submitted.
sizesize reflectsxs | sm | md | lg | xlsmHeight and font size.
radiusradiusxs | sm | md | lg | xl | fullCorner radius.
variantvariant reflectsdefault | filled | unstyleddefaultBox style.
EventDescription
inputWhen the date changes (picked or cleared).
changeWhen the date changes (picked or cleared).
ray-openThe calendar opened.
ray-closeThe calendar closed.
PartDescription
triggerThe button showing the date.
clearThe clear button.
dropdownThe calendar panel (a popover in the top layer).
calendarThe <ray-calendar> in the dropdown (its day, day-selected, day-today, day-outside, day-disabled, caption, nav and grid parts are exported).
inputThe hidden native <input type=date> that holds the value (the model).
wrapperThe box.

<ray-calendar>

WAI-ARIA grid: arrows move by day and week, Home/End to the week's ends, PageUp/PageDown by month (with Shift, by year), Enter/Space select.

PropertyAttributeTypeDefaultDescription
valuevaluestringThe selected date, ISO "YYYY-MM-DD".
minminstringEarliest selectable date (ISO).
maxmaxstringLatest selectable date (ISO).
localelocalestringLocale for month and weekday names. Default: the nearest lang attribute, else the browser's.
firstDayfirst-daynumberFirst day of the week, 0 (Sunday) to 6. Default: the locale's.
sizesize reflectsxs | sm | md | lg | xlsmDay cell size and font size.
fullWidthfull-width reflectsbooleanFills the width of its container: the columns share it and the days grow square, up to --ray-calendar-max-cell (default 1.5 times the size's cell), then wider than tall. Without it the calendar takes its size's width and shrinks when its container is narrower.
dayState—functionMarks days: called with each day's ISO date on every render, it returns a state name (letters, digits, - and _; not selected, today, outside nor disabled, the calendar's own parts) or nothing. The day button gets data-state and the part day-<state>, so ::part(day-taken) (or ::part(day-missed)::after for a dot) styles it from outside. Call refresh() when what it marks changed but the month did not.
EventDescription
changeA day was selected (read `value`).
PartDescription
headerThe row with the month and the navigation buttons.
captionThe month and year.
navThe previous/next month buttons.
gridThe day grid (role=grid).
dayEach day button (data-date="YYYY-MM-DD", [data-selected], [aria-current=date], [aria-disabled], [data-outside], and with dayState data-state plus the part day-<state>). ::part() takes no attribute selector, so what the day is comes as part tokens too: day-selected, day-today, day-outside, day-disabled, combinable with day-<state> (::part(day-taken day-selected)).
day-selectedThe selected day (also part day).
day-todayToday (also part day).
day-outsideA day of the month before or after (also part day).
day-disabledA day out of min/max (also part day).

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
date-picker.placeholderPick a date
date-picker.clearClear date
date-picker.dropdownChoose a date
date-picker.previous-monthPrevious month, {month}
date-picker.next-monthNext month, {month}

File upload

A drop zone to pick files: drag, click, keyboard or paste. Checks type, size and count as files arrive, lists them as ray-attachment rows (thumbnails, remove) and submits them with its form.

Code

In a raylang app

In a std/ui window with the native bridge, native makes browsing open the system's file dialog, with the accept types as its filter. The files it gives are paths on the user's disk, not bytes: they list like any other file (name, size, type) and the program reads them.

<form id="import">
  <ray-file-upload name="photos" native multiple accept="image/*" label="Photos"></ray-file-upload>
</form>
upload.addEventListener("change", () => {
  window.ray.send("import:" + JSON.stringify(upload.paths));   // ["/Users/ada/Pictures/a.jpg", …]
});

The form submits those paths under name. Dropped and pasted files are still File objects (upload.files holds both; a chosen one is a HostFile with a path). Without the bridge, or in a browser, native changes nothing.

<ray-file-upload> · RayFileUpload

A drag that can only be refused turns the zone red before the drop; refused files fire ray-reject and are explained under the zone. Without multiple a new file replaces the current one. Uploading is the app's: attachmentFor(file) gives the row whose progress/status/error to set.

PropertyAttributeTypeDefaultDescription
namename reflectsstringForm field name: every file is submitted under it.
labellabelstringLabel above the zone.
descriptiondescriptionstringHelp text under the label.
errorerrorstringError text (replaces the explanation of refused files).
requiredrequired reflectsbooleanThe form needs at least one file.
disableddisabled reflectsbooleanNo picking, dropping or removing.
acceptaccept reflectsstringAccepted types, as in <input type=file>: ".pdf,.png", "image/*", "application/json".
multiplemultiple reflectsbooleanSeveral files (else one, replaced by the next).
maxSizemax-sizestringLargest file: bytes or a size like "10 MB", "512 KB".
maxFilesmax-filesnumberWith multiple: the most files kept.
hinthintstringSmall text in the zone. Default: from accept, max-size and max-files ("PNG or PDF · up to 10 MB each · max. 5 files").
dropLabeldrop-labelstringDrag files here (text file-upload.drop)Title of the zone, before "or browse".
browseLabelbrowse-labelstringbrowse (text file-upload.browse)The link-styled word (the button text in compact).
activeLabelactive-labelstringDrop to add files (text file-upload.active)Title while files are dragged over it.
tapLabeltap-labelstringChoose files (text file-upload.tap)Title on touch screens (no hover), where dragging files is rare.
variantvariant reflectsdefault | compactdefaultdefault: a tall centered zone; compact: one row with a Browse button.
listlist reflectsrows | cards | nonerowsHow chosen files show: full-width rows, thumbnail cards, or not at all (render your own on change).
nativenative reflectsbooleanWith a native host (ray-elements/core/raylang.js in a std/ui window), browsing opens the system dialog and gives paths (see `paths`); drop and paste still give Files.
colorcolor reflectsstringAccent of hover, drag and the browse link (default: primary).
EventDescription
changeFiles were added or removed (read `files`, and `lastChange` for which).
ray-rejectSome files were refused (type, size or count).
ray-errorThe native dialog failed (with `native`).
SlotDescription
iconReplaces the upload icon.
PartDescription
dropzoneThe zone (a button).
iconThe icon tile.
hintThe small text in the zone.
filesThe list of chosen files.
labelThe label.
errorThe error text.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
file-upload.dropDrag files here
file-upload.browsebrowse
file-upload.activeDrop to add files
file-upload.tapChoose files
file-upload.imagesImages
file-upload.videosVideos
file-upload.audioAudio
file-upload.textText files
file-upload.types{list} or {last}
file-upload.too-large{name} is larger than {size}.
file-upload.only-oneOnly one file can be added.
file-upload.max{ one: "Up to {count} file can be added.", other: "Up to {count} files can be added." }
file-upload.fullNo more files can be added
file-upload.room{ one: "Only {count} more file", other: "Only {count} more files" }
file-upload.refusedFile type not allowed
file-upload.requiredSelect at least one file.
file-upload.hint-sizeup to {size}
file-upload.hint-size-eachup to {size} each
file-upload.hint-max{ one: "max. {count} file", other: "max. {count} files" }

Image crop

Frame 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. The piece between ray-file-upload (or an <input type=file>) and ray-avatar.

A profile photo
Ada Lovelace
Choose photo Use a sample
Cancel Use photo
A cover in 16:9, with the framing read back
—
Code

<ray-image-crop> · RayImageCrop

The image always covers the frame: at zoom 1 it fits the frame's short side, and it cannot be moved so far that a gap shows. The framing is read and set as crop, a rectangle in pixels of the original, so it can be saved, reopened or applied elsewhere. The image is decoded once into a reduced working copy (as many pixels as the output, or the stage on screen, need at max-zoom) and the full-size decode is released; toBlob and toDataURL draw from that copy. EXIF orientation is applied, as in an <img>. Styling: --ray-image-crop-inset (the dimmed margin around the frame, default --ray-space-4), --ray-image-crop-dim (its color) and --ray-image-crop-max-height (default 70vh).

PropertyAttributeTypeDefaultDescription
srcsrcstringThe image: a URL, or (as a property) a File or Blob, such as the one an <input type=file> gives. A cross-origin URL needs CORS to be exportable. A HostFile (the paths of ray-file-upload native) has no bytes: read it in the program and pass a URL.
aspectaspect reflectsstring1Width / height of the frame and of the output: "1", "16/9", "4:3", "1.5".
shapeshape reflectsrect | circlerectThe frame's mask. circle (an ellipse when the aspect is not 1) only masks: the output is still the rectangle, for ray-avatar to round.
zoomzoomnumber11: the image covers the frame; 2: twice as close. Kept between min-zoom and max-zoom; the user changes it.
minZoommin-zoomnumber1The least zoom (1 or more: the image always covers the frame).
maxZoommax-zoomnumber4The most zoom. It also sets how many pixels the working copy keeps.
zoomControlzoom-control reflectsbooleanA zoom slider under the image (the wheel, pinch and + / - zoom in any case).
outputSizeoutput-sizestring512Size of the exported image: a width ("320", the height from the aspect) or "640x360".
typetypestringimage/jpegFormat of toBlob/toDataURL. A browser that cannot encode it gives PNG (Safari has no WebP encoder).
qualityqualitynumber0.850…1, for image/jpeg and image/webp.
labellabelstringCrop image (text image-crop.label)Accessible name of the image area.
zoomLabelzoom-labelstringZoom (text image-crop.zoom)Name of the zoom slider, and the word of the announced zoom ("Zoom 150%").
disableddisabled reflectsbooleanNo moving nor zooming.
EventDescription
inputThe framing moved (every step of a drag, pinch, wheel or the slider).
changeThe framing settled: pointer released, a key pressed, the slider released or the wheel stopped (read crop, zoom).
ray-loadThe image loaded (its original size).
ray-errorThe image could not be loaded or decoded.
PartDescription
stageThe image area (focusable; role slider for the zoom).
imageThe image (a canvas of the working copy).
frameThe frame; what lies outside it is dimmed.
zoomThe zoom ray-slider (with zoom-control).

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
image-crop.labelCrop image
image-crop.zoomZoom

Input

A text field with label, description and error (Mantine's TextInput). Form-associated.

Highlighted text
Code

<ray-input> · RayInput

Also forwards placeholder, autocomplete, inputmode, pattern, min, max, step, minlength, maxlength, spellcheck, autocapitalize, enterkeyhint and list to the inner input. Enter submits its form as a native field does: through the first submit button (ray-button type="submit" included; nothing when it is disabled), or, without one, only when the form has a single text field.

PropertyAttributeTypeDefaultDescription
valuevaluestringCurrent value. The value attribute is the initial value (restored on form reset).
typetype reflectstext | email | password | search | number | url | tel | time | date | datetime-localtextInput type. time, date and datetime-local show the browser's picker (the native one on phones); value is what the input gives: "HH:MM", "YYYY-MM-DD", "YYYY-MM-DDTHH:MM".
namename reflectsstringForm field name.
labellabelstringVisible label (also the accessible name).
descriptiondescriptionstringHelp text under the label.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text; marks the field invalid (display only — does not block submit).
placeholderplaceholderstringPlaceholder text.
requiredrequiredbooleanRequired for form submission; shows an asterisk.
disableddisabledbooleanNot editable nor submitted.
readonlyreadonlybooleanNot editable, still submitted.
sizesize reflectsxs | sm | md | lg | xlsmHeight and font size.
radiusradiusxs | sm | md | lg | xl | fullCorner radius.
variantvariant reflectsdefault | filled | unstyleddefaultBox style.
highlight—functionMarks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap.
complete—functionInline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant).
suggestionsLabelsuggestions-labelstringSuggestions (text input.suggestions)Accessible name of the suggestion list.
AttributeDescription
autocompleteForwarded to the inner input.
inputmodeVirtual keyboard hint.
patternValidation pattern (regular expression).
minMinimum (number/date types).
maxMaximum (number/date types).
stepStep (number types).
minlengthMinimum length.
maxlengthMaximum length.
autocapitalizeMobile auto-capitalization.
enterkeyhintLabel of the Enter key on virtual keyboards.
listId of a <datalist> with suggestions.
EventDescription
ray-completeA suggestion was accepted (the text already has it).
ray-highlight-hoverThe highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title.
inputOn every edit (value already updated).
changeWhen an edit is committed (blur, Enter).
SlotDescription
leftSection before the text (icon).
rightSection after the text (icon, button).
PartDescription
inputThe inner <input>.
wrapperThe box around the input and sections.
labelThe label.
descriptionThe description.
errorThe error message.
suggestionsThe suggestion list (a listbox in the top layer).
suggestionEach suggestion ([aria-selected] when active).
suggestion-labelA suggestion's label (in the mono font).
suggestion-detailA suggestion's detail.
suggestion-descriptionA suggestion's description, under its label (in the interface font).
highlightEach marked range (also highlight-<kind> for a range with a kind).
text-layerThe layer behind the text that holds the marks.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
input.suggestionsSuggestions

Knob also 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. Form-associated.

A channel strip: an equalizer band with a log frequency, a gain and a pan that grows from the middle

Input

EQ, mid band

Send

Drag up or down (Shift: finer), scroll, or focus and use the arrows; a double click puts a knob back.

Sizes, and in a form
Reset volume=70
Code

<ray-knob> · RayKnob

Drag up or down to turn it (the whole sweep is 200px; hold Shift for ten times finer), or use the wheel. Keys: arrows step it (Shift: ten steps), Page Up/Down a tenth of the sweep, Home/End the ends. A double click returns to default-value. The dial is role=slider with the value's text (format, or the value and unit). Look: --ray-knob-size, --ray-knob-track, --ray-knob-arc, --ray-knob-body, --ray-knob-pointer, and the dial, track, arc, body and pointer parts.

PropertyAttributeTypeDefaultDescription
valuevaluenumberCurrent value. The value attribute is the initial one (restored on reset).
minminnumber0Minimum.
maxmaxnumber100Maximum.
stepstepnumber1Step; 0: continuous.
defaultValuedefault-valuenumberWhat a double click returns to. Default: the value attribute; without one, min (the middle when bipolar).
scalescale reflectslinear | loglinearlog: equal turns for equal ratios (20 Hz to 20 kHz); needs min above 0. The arrow keys then move a hundredth of the sweep.
bipolarbipolar reflectsbooleanThe arc grows from 0 (from the middle when the range does not span 0): pan, a balance, a detune.
namenamestringForm field name.
labellabelstringVisible label, above the dial (it names the slider).
descriptiondescriptionstringHelp text.
errorerrorstringError text.
disableddisabledbooleanNot interactive nor submitted.
colorcolor reflectsstringThe arc's color.
sizesize reflectsxs | sm | md | lg | xlsmThe dial's size (28 to 72px; --ray-knob-size for any other).
showValueshow-value reflectsbooleanShows the value under the dial.
unitunitstringAppended to the value's text (" dB", " Hz", "%").
format—functionThe value's text, shown and spoken: (v) => v >= 1000 ? `${v / 1000} kHz` : `${v} Hz`.
EventDescription
inputWhile it turns.
changeWhen it settles: the end of a drag, a key, a pause of the wheel, a double click.
PartDescription
dialThe dial (role=slider).
trackThe ring's track.
arcThe arc of the value.
bodyThe knob's body.
pointerThe line that shows where it points.
valueThe value under the dial (show-value).

Mode input

A 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. Everything else is ray-input.

Alt+↓ opens the menu from the field.
Code

<ray-mode-input> · RayModeInput

Declare the modes as <option> children (label, data-icon, data-hint, data-description, disabled, and data-set-<attribute> for each attribute the mode sets on the field) or with the options property. A mode's attributes replace the field's own while it is chosen and give them back after. The menu is a ray-menu of radio items in the field's shadow root; Alt+ArrowDown opens it from the field, and the trigger keeps the caret in the field.

PropertyAttributeTypeDefaultDescription
modemode reflectsstringThe chosen mode's value (default: the first). Setting it applies that mode without ray-mode-change.
options—arrayThe modes; when not set, the <option> children.
displaydisplay reflectslabel | icon | bothWhat the trigger shows: the mode's hint or label, its icon, or both. Default: the icon when the mode has one, else the label.
positionposition reflectsstart | endstartThe side of the field the trigger sits on.
menuLabelmenu-labelstringMode (text mode-input.menu)The trigger's accessible name, read with the current mode ("Mode: File").
nativeMenunative-menu reflectsbooleanWith a native host (a std/ui window with the bridge), the system's menu (no descriptions there).
EventDescription
ray-mode-changeThe user chose a mode (mode is already the new one); cancelable: preventDefault keeps the previous mode.
PartDescription
triggerThe button that opens the menu.
trigger-iconThe current mode's icon in the trigger.
trigger-labelThe current mode's hint or label in the trigger.
menuThe ray-menu of modes.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
mode-input.menuMode

Number input

A 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). An ARIA spinbutton.

An order: quantity × price
Subtotal
Discount
Total

Arrows step, Shift+arrows ×10, hold + or − to repeat.

Units, steps and locales
Durations: format="duration"
Clamping, states and variants
Code

<ray-number-input> · RayNumberInput

Arrow Up/Down step (Shift: ×10), Page Up/Down ×10, Home/End go to min/max. The value is a number (undefined when empty); the form gets its plain digits; min and max are checked (rangeUnderflow, rangeOverflow). Enter submits its form, as in ray-input.

PropertyAttributeTypeDefaultDescription
valuevaluenumberThe number (undefined when empty).
minminnumberMinimum.
maxmaxnumberMaximum.
stepstepnumber1What + and − add.
decimalsdecimalsnumberFixed decimals (2: 3 shows as 3.00).
prefixprefixstringShown before the number ("$"), beside the editable text: the field holds the digits only. Still in aria-valuetext and in the min/max messages.
suffixsuffixstringShown after the number (" kg", "%"), hugging it on the other side of the caret: the field holds the digits only.
thousandsSeparatorthousands-separatorstringGroups thousands in the shown text (",", ".", " ").
decimalSeparatordecimal-separatorstring.The decimal mark shown and typed ("," in many locales).
clampclampblur | strict | noneblurWhen out-of-range input is clamped: on blur, while typing, or never (then it is invalid).
formatformat reflectsnumber | durationnumberduration: the value is seconds, shown and typed as m:ss (h:mm:ss when min or max reaches an hour; a plain number is seconds); aria-valuetext says "3 minutes, 15 seconds" in the page's language. decimals, prefix, suffix and the separators do not apply.
hideControlshide-controls reflectsbooleanNo + and − buttons (the keys still step).
placeholderplaceholderstringShown while empty.
readonlyreadonly reflectsbooleanNot editable, still submitted.
EventDescription
inputOn every change of the value (typing, keys, buttons).
changeWhen the value is committed (blur, a step).
SlotDescription
leftLeft section (an icon).
rightRight section.
PartDescription
inputThe text field.
prefixThe prefix beside the text field.
suffixThe suffix beside the text field.
controlsThe + and − column.
incrementThe + button.
decrementThe − button.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
number-input.incrementIncrement
number-input.decrementDecrement
number-input.requiredPlease enter a number.
number-input.minThe minimum is {min}.
number-input.maxThe maximum is {max}.

Password input

A password field with a button that shows or hides what was typed (Mantine's PasswordInput). Everything else is ray-input: label, description, error, sizes, validation, forms.

Sign in
Sign in
New password with a strength meter
  • 10 characters or more
  • A number
  • A lowercase letter
  • An uppercase letter
  • A symbol ($, &, +…)
Variants, sizes and states
Code

<ray-password-input> · RayPasswordInput

autocomplete defaults to current-password: use new-password on sign-up and change forms. The toggle keeps the focus and the caret in the field.

PropertyAttributeTypeDefaultDescription
visiblevisible reflectsbooleanThe password is shown as text.
showLabelshow-labelstringShow password (text password-input.show)Accessible name of the toggle while hidden.
hideLabelhide-labelstringHide password (text password-input.hide)Accessible name of the toggle while shown.
EventDescription
ray-visibility-changeThe user showed or hid the password.
PartDescription
toggleThe show/hide button.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
password-input.showShow password
password-input.hideHide password

Path input also File path, Folder picker

A field for a path on disk: a file to open, a folder, or where to save. In a std/ui window (with ray-elements/core/raylang.js) a Browse… button opens the system dialog; in a browser it is a plain text field. Everything else is ray-input.

A project's paths, in a std/ui window
Save settingsIn a browser these are plain text fields.
Sizes and states
Code

In a raylang app

Browse… shows only in a std/ui window with the native bridge. It opens the system's dialog for the mode, starting in the folder of the current path (save also suggests the current file name). The chosen path fills the field and fires input and change; the program gets it with the form like any other field.

<ray-path-input name="workspace" label="Workspace" mode="folder"></ray-path-input>
<ray-path-input name="export" label="Export to" mode="save" accept=".csv"></ray-path-input>
// The program's side: ui.events() through bridge.handle, then the form arrives as usual.
for e in ui.events() {
    if (bridge.handle(e)) {
        continue;
    }
    if (e.kind == "message" && e.tag.starts_with("settings:")) {
        save_settings(e.tag.substring(9, e.tag.len()))?;
    }
}

<ray-path-input> · RayPathInput

Browse… shows only with a native host that offers pick_path (see core/host.js); the dialog starts in the folder of the current path. The path can always be typed or pasted.

PropertyAttributeTypeDefaultDescription
modemode reflectsopen | folder | saveopenWhat the dialog chooses: an existing file, a folder, or a file to save (the current name is suggested).
acceptaccept reflectsstringFile types the dialog offers, as in <input type=file>: ".json,.toml", "image/*" (ignored for folders).
browseLabelbrowse-labelstringBrowse… (text path-input.browse)Text of the button.
dialogTitledialog-titlestringTitle of the system dialog (default: the label).
EventDescription
changeThe path changed: typed and committed, or chosen in the dialog.
ray-errorThe system dialog failed.
PartDescription
browseThe Browse… button.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
path-input.browseBrowse…

Radio group

One choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control.

Delivery, with a live total
Subtotal
$48.00
Delivery
$0.00
Total
$48.00

Arrives in 4–6 business days.

Cards: ray-radio-card in a ray-grid
Popular
Horizontal, colors and the outline variant
Light Dark System Hourly Daily Weekly S M L XL
Sizes
xs sm md lg xl
Required, in a form
A friend or a colleague A search engine A talk or a meetup Somewhere else
Send
Code

<ray-radio-group>

Arrow keys move the selection, Tab enters and leaves the group.

PropertyAttributeTypeDefaultDescription
valuevaluestringValue of the checked radio. Initial: the value attribute, or a radio with the checked attribute.
namenamestringForm field name.
labellabelstringGroup label (also its accessible name).
descriptiondescriptionstringHelp text.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text.
requiredrequiredbooleanA choice is needed to submit.
disableddisabledbooleanDisables every radio.
orientationorientation reflectsvertical | horizontalverticalLayout of the radios.
sizesize reflectsxs | sm | md | lg | xlsmSize of every radio.
colorcolorstringChecked color of every radio.
variantvariant reflectsfilled | outlinefilledChecked look of every radio: filled circle, or colored ring and dot.
EventDescription
inputWhen the user picks a radio.
changeWhen the user picks a radio.
SlotDescription
(default)ray-radio or ray-radio-card elements (may be wrapped in layout elements: a ray-grid of cards).

<ray-radio>

PropertyAttributeTypeDefaultDescription
valuevalue reflectsstringValue given to the group when chosen.
checkedchecked (initial)booleanWhether this radio is the group's value; setting it sets the group's value. The checked attribute marks the group's initial value (when the group has no value attribute).
labellabelstringLabel text (or the content).
descriptiondescriptionstringHelp text under the label.
disableddisabledbooleanCannot be chosen.
colorcolorstringOverrides the group color.
sizesizexs | sm | md | lg | xlOverrides the group size.
variantvariant reflectsfilled | outlineOverrides the group variant.
SlotDescription
(default)Label content.
PartDescription
indicatorThe circle.
labelThe label.

<ray-radio-card>

A radio drawn as a card: a title (label), a detail (description), an icon, more content; checked, it takes the color's border and light background. Inside a ray-radio-group like a ray-radio (arrow keys, the form, required, disabled); put the cards in a ray-grid for columns.

PropertyAttributeTypeDefaultDescription
hideIndicatorhide-indicator reflectsbooleanNo radio circle: the card's border and background alone show the choice.
SlotDescription
(default)More content under the description.
iconAn icon before the title.
PartDescription
rootThe card.
iconAround the icon slot.

Segmented control

One choice among a few, as a segmented row with a sliding indicator. Options from child <option> elements or data. Form-associated.

Billing period
Hobby$0Free forever
Team$32per month
Switch the view
  • Release notes12 KB
  • Roadmap8 KB
  • Brand kit2.4 MB
  • Invoices640 KB
  • Screenshots18 MB
  • Contracts1.1 MB
Colors, sizes and radius
Vertical, full width, and from data
Narrow containers: drag the corner of the box

orientation="auto" stacks the options when they do not fit in a row. In a box narrower than even the stack, the labels end in an ellipsis.

Code

<ray-segmented-control> · RaySegmentedControl

PropertyAttributeTypeDefaultDescription
valuevaluestringSelected value (default: the first enabled option).
data—arrayOptions as strings or { value, label, disabled }.
namenamestringForm field name.
colorcolor reflectsstringIndicator color (default: a raised neutral segment).
sizesize reflectsxs | sm | md | lg | xlsmHeight and font size.
radiusradiusxs | sm | md | lg | xl | fullCorner radius.
fullWidthfull-widthbooleanTakes the whole width.
orientationorientation reflectshorizontal | vertical | autohorizontalDirection. auto: a row that stacks (data-stacked, aria-orientation vertical) when its options at their natural width do not fit in the room its parent gives it, and goes back to a row when they fit again.
disableddisabledbooleanNot interactive nor submitted.
EventDescription
inputThe user picked another option.
changeThe user picked another option.
SlotDescription
(default)<option> elements.
PartDescription
rootThe row.
indicatorThe sliding highlight.
controlEach option button. In a narrow container the options shrink and their labels end in an ellipsis.
control-selectedThe chosen option (also part control): ::part() takes no attribute selector.
labelThe text of each option.

Select

A select with its own dropdown (keyboard, typeahead, groups); options from child <option> elements or the data property. Form-associated.

Dependent selects
Pick a country and a city to see the delivery estimate.
Groups, descriptions and errors
Variants, sizes and states
Sort by
Code

<ray-select> · RaySelect

PropertyAttributeTypeDefaultDescription
valuevaluestringSelected value.
data—arrayOptions as strings or { value, label, disabled } (instead of child options).
placeholderplaceholderstringShown while nothing is selected (with required, blocks submit).
openopen reflectsbooleanThe dropdown is shown.
nativenative reflectsauto | always | neverautoWhich dropdown a tap opens: the system's picker (the native select's, the usual one on a phone) or the component's list. auto: the system's on a touch screen (pointer: coarse), else the list. The value, events and shown text follow either.
namenamestringForm field name.
labellabelstringVisible label.
descriptiondescriptionstringHelp text.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text.
requiredrequiredbooleanRequired for form submission.
disableddisabledbooleanNot interactive nor submitted.
sizesize reflectsxs | sm | md | lg | xlsmHeight and font size.
variantvariant reflectsdefault | filled | unstyleddefaultBox style.
EventDescription
inputWhen the selection changes.
changeWhen the selection changes.
ray-openThe dropdown opened.
ray-closeThe dropdown closed.
SlotDescription
(default)<option> and <optgroup> elements.
PartDescription
triggerThe combobox button showing the selected option.
dropdownThe listbox panel (a popover in the top layer).
optionEach option in the dropdown ([aria-selected], [data-active], [aria-disabled]).
selectThe hidden native <select> that holds the value (the model).
wrapperThe box.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
select.emptyNo options

Slider also 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. Form-associated.

Adjust a photo
Reset
Steps and marks
Colors, sizes and states
Vertical: a graphic equalizer (-12 to +12 dB a band)
Flat
A console: fader caps (thumb="cap") on a desk's dB curve (taper="fader"). Drag a cap from where it is (Shift: finer), use the wheel, or double click for 0 dB
0.0 dBVocals
-4.5 dBGuitar
-9.0 dBBass
-2.0 dBDrums
Your own thumb: the --ray-slider-thumb-* variables
Code

<ray-slider> · RaySlider

PropertyAttributeTypeDefaultDescription
valuevaluenumberCurrent value. The value attribute is the initial one (restored on reset).
minminnumber0Minimum.
maxmaxnumber100Maximum.
stepstepnumber1Step.
namenamestringForm field name.
labellabelstringVisible label.
descriptiondescriptionstringHelp text.
descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
errorerrorstringError text.
disableddisabledbooleanNot interactive nor submitted.
colorcolor reflectsstringTrack and thumb color.
sizesize reflectsxs | sm | md | lg | xlsmTrack and thumb size.
showValueshow-value reflectsbooleanShows the value next to the label.
unitunitstringAppended to the shown value and its spoken text (%, px, ms…).
marks—arrayLabeled ticks under the track.
orientationorientation reflectshorizontal | verticalhorizontalvertical: a fader, the minimum at the bottom and the marks before the track (on the left, aligned against it); its length is the host's height (--ray-slider-length, 12rem by default). The arrow keys work as on a horizontal one (ArrowUp raises it).
thumbthumb reflectsround | caproundThe thumb: round, or cap (a mixing desk's fader cap: a short, wide block with a line at its middle, over a plain slot). A cap also plays as a fader: a click on the slot does not move it, a drag moves it from where it is (Shift: ten times finer), the wheel steps it (Shift: ten steps), and the arrow keys with Shift take ten steps. Any other look: the --ray-slider-thumb-size (across the track), -length (along it), -background, -border, -radius and -shadow variables.
tapertaper reflectslinear | faderlinearHow the values spread along the track. fader: dB on a mixing desk's curve (the fourth root of the gain, min at the bottom), so the range used to mix gets most of the travel: with -60…6, 0 dB at 81 %, -12 at 52 %, -24 at 32 %. The marks follow it; ray-meter taper="fader" beside it lines up with them. A key or a wheel notch moves a hundredth of the travel (Shift: a tenth). The curve itself: taperPosition and taperValue from @raylang/elements/core.
defaultValuedefault-valuenumberWhat a double click returns to (a fader's 0 dB). Without it, the value attribute.
EventDescription
inputWhile dragging.
changeWhen released.
PartDescription
inputThe native range input.

Switch

An on/off toggle with the same API as Checkbox, announced as a switch.

A settings panel
NotificationsPause all of them at once.
EmailMentions, replies and invitations.
PushOn this device, while the app is closed.
Weekly digestEvery Monday at 9:00.

On: Email, Push.

Labels, descriptions and sides
Colors and sizes
Code

<ray-switch> · RaySwitch

Same properties and events as ray-checkbox (indeterminate does not apply).

PropertyAttributeTypeDefaultDescription
checkedchecked (initial)booleanCurrent state. The checked attribute is the initial state.
valuevaluestringonSubmitted value when on.
namenamestringForm field name.
labellabelstringLabel text (or the content).
descriptiondescriptionstringHelp text.
errorerrorstringError text.
labelPositionlabel-position reflectsend | start | right | leftendSide of the label: start/end follow the writing direction; left/right are sides of the screen.
colorcolorstringTrack color when on.
sizesize reflectsxs | sm | md | lg | xlsmTrack size.
disableddisabledbooleanNot interactive nor submitted.
EventDescription
changeWhen the user toggles it.
SlotDescription
(default)Label content.
PartDescription
trackThe track.
thumbThe thumb.

Tags input also 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. No dropdown, so on a phone nothing opens over the field when the keyboard comes up.

Suggestions under the field: type to filter, click to add, or type anything and press Enter

Add or remove tags: the value shows here.

In a form, sizes and states
Submit
Code

<ray-tags-input> · RayTagsInput

A text field that keeps tags as chips, and its suggestions (child <option> elements or data) as buttons under it. Typing filters them, case and accents aside ("diabe" finds "Diabetes"); the ones already chosen are left out. Pressing a suggestion while typing keeps the focus in the field, so the phone's keyboard stays up. Enter, a separator (a pasted "a, b, c" adds three) or leaving the field adds what was typed, anything at all; no two tags are the same, case and accents aside. Backspace in an empty field removes the last tag, Escape clears the text. The form gets one entry per tag. For a fixed list to pick from, use ray-combobox multiple.

PropertyAttributeTypeDefaultDescription
valuevalue (initial)arrayThe tags. The value attribute: "a,b". A string "a,b" assigned to the property is read as a list too.
data—arraySuggestions instead of child <option> elements.
placeholderplaceholderstringShown while there are no tags.
maxmaxnumberAt most this many tags; when reached, nothing more is added and the suggestions hide.
suggestionsLimitsuggestions-limitnumber6At most this many suggestions shown (keep typing for the rest); 0 shows them all.
suggestionsLabelsuggestions-labelstringSuggestions (text tags-input.suggestions)The accessible name of the group of suggestions.
separatorsseparatorsstring,Characters that end a tag as they are typed or pasted (",;" for both); "" for none (Enter and leaving the field still add).
EventDescription
changeA tag was added or removed (read value).
inputSame moment as change.
SlotDescription
(default)<option> elements: the suggestions (the text is the tag; value, if different, is what the tag stores).
PartDescription
inputThe text field.
tagsThe tags container.
tagA tag.
tag-removeA tag's remove button.
suggestionsThe group of suggestions under the field.
suggestionA suggestion button.

Texts

What it writes itself, in English; setStrings() translates them (Getting started: Languages).

KeyEnglish
tags-input.removeRemove {label}
tags-input.suggestionsSuggestions

Textarea

A multi-line text field that can grow with its content. Form-associated.

A comment with a character count
0 / 280 CancelPost
    Autosize, rows and read-only
    Type a few lines here and watch it grow. 1.27.39 — faster startup, per-page modules, and the sidebar keeps its scroll.
    Variants, sizes and states
    Not editable, not submitted.
    Code

    <ray-textarea> · RayTextarea

    Also forwards placeholder, autocomplete, minlength, maxlength, spellcheck and wrap. Initial value: the value attribute or the element's text.

    PropertyAttributeTypeDefaultDescription
    valuevaluestringCurrent value.
    rowsrowsnumber3Visible rows (minimum when autosize).
    autosizeautosizebooleanGrows with the content.
    maxRowsmax-rowsnumberWith autosize: stop growing and scroll after this many rows.
    namenamestringForm field name.
    labellabelstringVisible label.
    descriptiondescriptionstringHelp text.
    descriptionPositiondescription-position reflectsabove | belowaboveThe description before the control (help first) or after it, with the error (fields in a row stay aligned).
    errorerrorstringError text.
    requiredrequiredbooleanRequired for form submission.
    disableddisabledbooleanNot editable nor submitted.
    readonlyreadonlybooleanNot editable, still submitted.
    sizesize reflectsxs | sm | md | lg | xlsmFont size.
    variantvariant reflectsdefault | filled | unstyleddefaultBox style.
    highlight—functionMarks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap.
    complete—functionInline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant).
    suggestionsLabelsuggestions-labelstringSuggestions (text textarea.suggestions)Accessible name of the suggestion list.
    AttributeDescription
    placeholderPlaceholder text.
    autocompleteForwarded to the inner textarea.
    minlengthMinimum length.
    maxlengthMaximum length.
    wrapsoft or hard.
    EventDescription
    ray-completeA suggestion was accepted (the text already has it).
    ray-highlight-hoverThe highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title.
    inputOn every edit.
    changeWhen an edit is committed.
    PartDescription
    textareaThe inner <textarea>.
    wrapperThe box.
    suggestionsThe suggestion list (a listbox in the top layer).
    suggestionEach suggestion ([aria-selected] when active).
    suggestion-labelA suggestion's label (in the mono font).
    suggestion-detailA suggestion's detail.
    suggestion-descriptionA suggestion's description, under its label (in the interface font).
    highlightEach marked range (also highlight-<kind> for a range with a kind).
    text-layerThe layer behind the text that holds the marks.

    Texts

    What it writes itself, in English; setStrings() translates them (Getting started: Languages).

    KeyEnglish
    textarea.suggestionsSuggestions

    Bottom nav

    The 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. Links or a value; an action button in the middle; hides on scroll.

    Patterns (tap the destinations; scroll the last one)
    Homevalue · change
    The pill, a count and a dot
    Todaylabels="active" · indicator="line"
    Five destinations, only the current label, a teal line
    FeedThe + fires ray-select
    variant="floating", an action in the middle, an avatar as icon
      hide-on-scroll (with an app bar that hides too)
      Code

      <ray-bottom-nav>

      With href items it marks the link to this page (aria-current="page"); without, it is a control (value, change). Clear of the home indicator (safe-area inset). In a ray-app-shell, put it in the bottom slot.

      PropertyAttributeTypeDefaultDescription
      valuevalue reflectsstringThe current destination (an item's value, else its href, else its label).
      labellabelstringMain (text bottom-nav.label)Accessible name of the navigation.
      labelslabels reflectsalways | active | neveralwaysWhich labels show (the others stay for assistive technology).
      indicatorindicator reflectspill | line | nonepillHow the current destination is marked besides its color.
      colorcolor reflectsstringA palette color or any CSS color for the current item and the action (default: primary).
      variantvariant reflectsdefault | floatingdefaultdefault: a bar across the bottom; floating: a rounded bar off the edges.
      hideOnScrollhide-on-scroll reflectsbooleanSlides away while the content scrolls down, back on the way up.
      fixedfixed reflectsbooleanPinned to the bottom of the window (outside a shell).
      scrollTargetscroll-targetstringA selector of the element whose scrolling it follows (default: its shell's, else the window).
      EventDescription
      changeThe user picked another destination (read value).
      ray-selectAn action item was pressed.
      SlotDescription
      (default)ray-bottom-nav-item elements (3 to 5).
      PartDescription
      navThe <nav>.

      <ray-bottom-nav-item>

      A link with href, else a button. The badge is read with the label ("Messages, 3").

      PropertyAttributeTypeDefaultDescription
      valuevalue reflectsstringIts value (default: its href, else its label).
      labellabelstringThe label.
      iconiconstringAn icon of the registry, drawn filled on the current item when it has a filled version (or put one in the icon slot: yours, as it is).
      hrefhref reflectsstringMakes it a link.
      badgebadgestringA count or a short text on the icon.
      dotdot reflectsbooleanA dot on the icon (something new).
      activeactive reflectsbooleanSet by the bar: the current destination.
      disableddisabled reflectsbooleanNot interactive.
      actionaction reflectsbooleanA raised round button ("New"): it fires ray-select on the bar, it is not a destination.
      SlotDescription
      iconA custom icon (a ray-icon, an svg, an avatar).
      PartDescription
      itemThe link or button.
      indicatorThe pill behind the icon.
      badgeThe badge.
      labelThe label.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      bottom-nav.labelMain
      bottom-nav.badge{label}, {badge}
      bottom-nav.dot{label}, new

      Document tabs

      The 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. The app closes them: ray-request-close asks.

      GETList releases POSTCreate release DELETEDelete asset

      Click a tab or use ←/→; × (or a middle click, or Delete on the focused tab) closes it. Closing the unsaved one asks first. The tabs share one panel, filled for the selected request.

      Code

      <ray-doc-tabs>

      Unlike ray-tabs, a tab has no panel of its own: they all control the element named by panel, whose content the app fills for the selected one. Closing is the app's: the ×, a middle click or Delete/Backspace fire ray-request-close, and the app removes the tab (after asking about unsaved changes, if it must). When the selected tab is removed, the one at its place is selected (change) and, if the closed tab had the focus, focused. More tabs than width: the bar scrolls sideways, fades the edge that hides tabs (data-overflow-start / data-overflow-end on the host), scrolls with a vertical wheel and keeps the selected tab in view.

      PropertyAttributeTypeDefaultDescription
      valuevaluestringValue of the selected tab (default: the first).
      panelpanelstringThe id of the shared panel: it gets role=tabpanel and aria-labelledby the selected tab; the tabs get aria-controls.
      labellabelstringAccessible name of the tab list ("Open requests").
      closeLabelclose-labelstringClose (text doc-tabs.close)Tooltip of the ×.
      dirtyLabeldirty-labelstringUnsaved changes (text doc-tabs.dirty)What assistive technology hears after the name of a dirty tab.
      EventDescription
      changeThe selected tab changed: a click, the arrow keys, or the selected tab removed.
      ray-request-closeThe × was clicked, the tab middle-clicked, or Delete/Backspace pressed on it: remove the tab to close it (not fired for hide-close tabs).
      SlotDescription
      (default)ray-doc-tab elements.
      endAfter the tabs, outside the scrolling list: a new-tab button.
      PartDescription
      listThe tab list (it scrolls sideways when the tabs do not fit).
      endThe end slot's box.

      <ray-doc-tab>

      A document's tab: an icon or tag (slot left), its name (cut with an ellipsis; give the full one in title), and the × or the unsaved dot.

      PropertyAttributeTypeDefaultDescription
      valuevalue reflectsstringIdentifies the document (ray-doc-tabs value).
      dirtydirty reflectsbooleanUnsaved changes: a dot in place of the ×, which comes back under the pointer.
      hideClosehide-close reflectsbooleanCannot be closed: no ×, no middle click, no Delete.
      SlotDescription
      (default)The document's name.
      leftAn icon or a tag (a file type, an HTTP method).
      PartDescription
      labelThe name.
      left-sectionThe left slot's box.
      closeThe × (pointer only: it is not focusable).
      dotThe unsaved mark.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      doc-tabs.closeClose
      doc-tabs.dirtyUnsaved changes

      Pagination

      Page navigation: previous/next, optional first/last, page numbers with ellipses; the number of items stays constant so it does not jump.

      Page 10 of 20

      Code

      <ray-pagination> · RayPagination

      JS: setPage(n), next(), previous(), first(), last(); page (clamped value).

      PropertyAttributeTypeDefaultDescription
      totaltotalnumber1Number of pages.
      valuevaluenumber1Current page (1-based).
      siblingssiblingsnumber1Pages shown on each side of the current one.
      boundariesboundariesnumber1Pages always shown at the start and the end.
      withEdgeswith-edges reflectsbooleanAdds first/last page buttons.
      hideControlshide-controls reflectsbooleanHides the previous/next (and first/last) buttons.
      colorcolor reflectsstringColor of the current page: a palette color or any CSS color. Default: the primary color.
      sizesize reflectsxs | sm | md | lg | xlsmItem size.
      radiusradiusxs | sm | md | lg | xl | fullCorner radius of the items.
      disableddisabled reflectsbooleanNot interactive.
      labellabelstringPagination (text pagination.label)Accessible name of the navigation landmark.
      EventDescription
      changeThe user went to another page (read `value`).
      PartDescription
      rootThe <nav> landmark.
      listThe list of items.
      itemEvery button (pages and controls).
      activeThe current page button.
      controlPrevious/next/first/last buttons.
      dotsAn ellipsis.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      pagination.labelPagination
      pagination.previousPrevious page
      pagination.nextNext page
      pagination.pagePage {page}

      Stepper

      A task in steps (Mantine's Stepper): a wizard, a checkout, an onboarding. Numbers or icons, labels, connectors, the content of the active step; loading and error states; completed steps can be revisited.

      A checkout
      Standard · freeExpress · $9
      2 × Pro seats
      $2,499.00
      Total
      $2,499.00
      Order placedA receipt is on its way to ada@ray.dev.Start over
      Back Next
      Vertical, with a step in progress

      Compiled 42 modules.

      All tests passed.

      ray-remote-1.27.39-macos-arm64.dmg · 64%

      Not started.

      Labels under the numbers, sizes, colors
      Code

      <ray-stepper>

      The steps are a labelled list; the active one has aria-current="step" and each reads "Step 2 of 4: Shipping, completed". Only the active step's content shows; past the last step, the completed slot.

      PropertyAttributeTypeDefaultDescription
      activeactive reflectsnumber0Index of the active step (steps.length: completed).
      orientationorientation reflectshorizontal | verticalhorizontalSteps in a row above the content, or in a column beside it.
      iconPositionicon-position reflectsstart | top | leftstartLabel beside the number (after it in the reading direction), or under it (narrow screens, many steps). "left", its former name, still works.
      allowStepSelectallow-step-select reflectsbooleanCompleted steps are buttons that go back to them.
      linearlinearbooleantrueWith allow-step-select off, false lets the user jump to any step.
      sizesize reflectssm | md | lgmdSize of the numbers.
      colorcolor reflectsstringA palette color or any CSS color for active and completed steps (default: primary).
      labellabelstringProgress (text stepper.label)Accessible name of the list of steps.
      EventDescription
      changeactive changed by the user (a step clicked, next(), prev()).
      SlotDescription
      (default)ray-step elements.
      completedShown once every step is done.
      PartDescription
      stepsThe list of steps.
      stepA step (also step-done, step-active, step-todo).
      indicatorA step's number or icon.
      labelA step's label.
      descriptionA step's description.
      connectorThe line between steps.
      contentThe content area.

      <ray-step>

      A step: its header is drawn by the stepper, its content shows while it is active.

      PropertyAttributeTypeDefaultDescription
      labellabelstringThe label.
      descriptiondescriptionstringA line under the label.
      iconiconstringAn icon instead of the number.
      completedIconcompleted-iconstringThe icon once done (default: check).
      loadingloading reflectsbooleanA spinner instead of the number.
      errorerrorstringAn error message: red step, the message as its description.
      disableddisabled reflectsbooleanCannot be selected.
      SlotDescription
      (default)The content shown while it is active.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      stepper.labelProgress
      stepper.stepStep {index}
      stepper.positionStep {index} of {count}:

      Tabs

      Tabs and panels (WAI-ARIA tabs pattern): arrows, Home/End, automatic or manual activation.

      Default · underline
      Code Tests 12 Settings Billing
      ray-remotemain · updated 2 hours ago
      • src/6 files
      • src/main.ray4.2 KB
      • src/server.ray11.8 KB
      • ray.toml312 B
      12 tests, all passing1.84 s
      • server › serves the index12 ms
      • server › rejects a bad token8 ms
      • sync › resumes after a drop1.2 s
      SaveReset
      Billing.
      Pills
      Day Week Month
      Compact · size xs
      Params Headers Body Auth Tests Settings
      Outline · vertical
      General Editor Keybindings
      Indent width
      • Command palette⌘ K
      • Run tests⌘ T
      • Toggle sidebar⌘ B
      • Format document⇧ ⌥ F
      Code

      <ray-tabs>

      More tabs than width: the list scrolls sideways, fades the edge that hides tabs, scrolls with a vertical wheel and keeps the selected tab in view. The host then carries data-overflow-start and data-overflow-end (following the writing direction), to style it further.

      PropertyAttributeTypeDefaultDescription
      valuevaluestringValue of the active tab (default: the first enabled one).
      variantvariant reflectsdefault | outline | pillsdefaultTab style.
      orientationorientation reflectshorizontal | verticalhorizontalTab list direction (and arrow keys).
      colorcolor reflectsstringActive indicator color.
      sizesize reflectsxs | sm | md | lg | xlsmHeight, font size and padding of the tabs (xs for a compact bar).
      activationactivationauto | manualautomanual: arrows move focus, Enter/Space activates.
      growgrow reflectsbooleanTabs share the full width.
      EventDescription
      changeThe user activated another tab.
      SlotDescription
      (default)ray-tab and ray-tab-panel elements (tabs move to the tab list on their own).
      PartDescription
      listThe tab list (it scrolls sideways when the tabs do not fit).
      panelsThe panel area.

      <ray-tab>

      PropertyAttributeTypeDefaultDescription
      valuevalue reflectsstringMatches a ray-tab-panel's value.
      disableddisabled reflectsbooleanCannot be activated.
      countcount reflectsstringA small number after the label ("3", "99+"), lighter than a badge; part of the tab's accessible name. Empty: none.
      SlotDescription
      leftIcon.
      rightA badge or other content after the label (for a plain number, count is lighter).
      PartDescription
      countThe count.

      <ray-tab-panel>

      PropertyAttributeTypeDefaultDescription
      valuevalue reflectsstringMatches a ray-tab's value.

      Command palette

      Search and run actions from the keyboard (Mantine's Spotlight): fuzzy search, groups, shortcuts, ⌘K / Ctrl+K; combobox + listbox pattern in a modal dialog.

      Open command palette

      On this site ⌘K belongs to the docs search in the header — another ray-command-palette, over the components and guides. This one has hotkey="" and opens with the button.

      Code

      In a raylang app

      With native-menus and the native bridge, the palette also lists the app's menu bar: every item, grouped by its menu, with its shortcut, the disabled ones greyed out. Running one gives the program the same "menu" event as choosing it in the menu bar, so the program handles it in one place.

      let n = bridge.system();
      bridge.menu(n, "File", [ui.item("new", "New window", "cmd+n"), ui.item("open", "Open…", "cmd+o")])?;
      for raw in ui.events() {
          let e = match (bridge.route(n, raw)) {
              Option.Some(e) => e,
              Option.None => continue,
          };
          if (e.kind == "menu" && e.tag == "new") {
              new_window()?;
          }
      }
      <ray-command-palette native-menus></ray-command-palette>

      Declare the menus with bridge.menu (and change them with bridge.replace_menu and bridge.set_menu_item) so the palette knows them.

      <ray-command-palette> · RayCommandPalette

      Running an action fires ray-select and calls its onSelect. The best matches come first, grouped.

      PropertyAttributeTypeDefaultDescription
      openopen reflectsbooleanShown.
      actions—arrayThe actions.
      queryquerystringThe search text.
      placeholderplaceholderstringSearch commands… (text command-palette.placeholder)Placeholder of the search field.
      hotkeyhotkeystringmod+kToggle shortcut (mod = ⌘ on macOS, Ctrl elsewhere); empty to disable.
      limitlimitnumber50Maximum results.
      emptyLabelempty-labelstringNothing found (text command-palette.empty)Text without results.
      labellabelstringCommand palette (text command-palette.label)Accessible name.
      hideHinthide-hint reflectsbooleanNo keyboard hint at the bottom.
      navigateLabelnavigate-labelstringnavigate (text command-palette.navigate)The keyboard hint's word for ↑↓.
      runLabelrun-labelstringrun (text command-palette.run)The keyboard hint's word for ↵.
      closeLabelclose-labelstringclose (text command-palette.close)The keyboard hint's word for esc.
      nativeMenusnative-menus reflectsbooleanWith a native host (ray-elements/core/raylang.js in a std/ui window, menus declared with elements/bridge), also lists the app's menu bar, grouped by menu with its shortcuts (an item of a submenu under its path, "File › Open Recent"); running one gives the program the menu's own event.
      overlayBluroverlay-blurstringBlur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml).
      EventDescription
      ray-selectAn action was run.
      ray-openAfter it opened.
      ray-closeAfter it closed.
      PartDescription
      dialogThe dialog.
      inputThe search field.
      optionEach result.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      command-palette.labelCommand palette
      command-palette.placeholderSearch commands…
      command-palette.emptyNothing found
      command-palette.navigatenavigate
      command-palette.runrun
      command-palette.closeclose
      command-palette.shortcutShortcut {shortcut}

      Dialog also Modal

      ray-elements's modal, on the native <dialog>: top layer, the rest of the page inert, focus trapped and restored, stackable. Title, description, header, body and footer; preset or free sizes. Also exports confirmDialog().

      The modal
      ray-dialog is the modal of ray-elements Backdrop, inert page, trapped and restored focus, Escape, stacking. This one takes 70% of the window (size="70%" height="70%") and holds a whole settings screen: vertical tabs, fields, a table, sliders, switches and a confirmation stacked on top.
      Project settings
      Live General Members Build Notifications Danger zone
      Visibility
      Invite
      Every build Failures only Nothing
      These actions affect everyone in the project and cannot be undone.
      Transfer ownershipMove ray-remote to another team.
      Transfer…
      Delete projectRemoves builds, releases and the update channel.
      Delete…
      Last saved 2 minutes ago Cancel Save changes
      Patterns
      RenameOne field, focused on open; the button's value is the returnValue.
      Open
      ConfirmconfirmDialog() builds one and resolves to true or false.
      Delete…
      Create projectA larger form (size lg) with a header badge; read its fields on ray-close.
      Open
      Unsaved changesPersistent: no ×, Escape or backdrop; one of three answers.
      Open
      Guarded draftray-request-close is cancelable: closing a written note asks first.
      Open
      Keyboard shortcutsLong content near the top (position top): the body scrolls, header and footer stay.
      Open
      Build logsize="full" for a workspace: almost the whole window.
      Open
      What's newSmall and announcement-like (size sm), with a hero and a single action.
      Open
      Cancel Rename
      raylang 1.27
      Frontend
      Cancel Create

      Your changes will be lost if you close without saving.

      Don't save Cancel Save
      Cancel Save note
      General
      Command palette⌘K
      Settings⌘,
      Toggle sidebar⌘B
      Toggle theme⌘⇧L
      Editor
      Save⌘S
      Find⌘F
      Go to line⌃G
      Format document⌥⇧F
      Comment line⌘/
      Run
      Run program⌘R
      Run tests⌘⇧T
      Build native⌘⇧B
      Stop⌘.
      Navigation
      Next tab⌃Tab
      Previous tab⌃⇧Tab
      Go to file⌘P
      Go back⌃-
      Done
      Passed
      $ ray build --native --release src/main.ray
        compiling std/ui, std/json, net 0.5.0, web 0.4.6
        checking  42 modules · 0 warnings
        linking   target/release/ray-remote (4.2 MB)
      $ ray test
        ok   session: resumes after reconnect (12 ms)
        ok   files: upload with progress (31 ms)
        ok   files: rejects paths outside the root (2 ms)
        ok   ui: palette lists the menu commands (48 ms)
        ok   ui: theme follows the system (7 ms)
        result: 5 test(s), all passed ✓
      $ ray bundle --name "Ray Remote" -o dist
        bundle    dist/Ray Remote.app (ad-hoc signed)
        done in 18.4 s
      Close Show in folder
      • New ray-toggle and ray-toggle-group
      • New ray-file-upload with drag and drop
      • Changed every value change is a change event
      • Docs React and Vue code for every example
      Got it
      Code

      In a raylang app

      With the native bridge, confirmDialog() asks with the system's modal dialog instead of a ray-dialog, with the same answer. A red confirmation (a destructive action) gets the warning style. native: false keeps the page's dialog, for a question that needs more than a sentence.

      if (await confirmDialog({ label: "Delete 3 builds?", message: "This cannot be undone.", confirmLabel: "Delete", color: "red" })) {
        window.ray.send("delete:" + ids.join(","));
      }

      ray-dialog itself is always the page's: a form, a settings panel or a wizard stay in the page.

      <ray-dialog> · RayDialog

      Any slotted element with data-dialog-close closes it (its value becomes returnValue). JS: show(), close(returnValue), confirmDialog({ label, message, confirmLabel, cancelLabel, color, native }) -> Promise<boolean>; with a native host (ray-elements/core/raylang.js in a std/ui window) it asks with the system dialog unless native is false, and with the ray-dialog when the system cannot (on a phone, where the bridge does not offer it, or when the call fails).

      PropertyAttributeTypeDefaultDescription
      openopen reflectsbooleanShown as a modal.
      labellabelstringHeading (also the dialog's accessible name).
      descriptiondescriptionstringA line under the title (the dialog's accessible description).
      sizesize reflectsstringmdWidth: xs…xl, full (the whole window), or any CSS length; a percentage is of the window (70% = 70vw, at least 40rem). Never wider than the window.
      heightheight reflectsstringFixed height (the body scrolls): any CSS length; a percentage is of the window (70% = 70dvh, at least 30rem). Never taller than the window. Default: as tall as the content, up to the window.
      radiusradius reflectsstringCorner radius: xs…xl, none, or a CSS length. Default: lg.
      positionposition reflectscenter | topcenterVertical placement.
      persistentpersistent reflectsbooleanEscape and backdrop clicks do not close it (the × still does; hide it with hide-close). To allow only one of them, cancel ray-request-close by its source.
      hideClosehide-close reflectsbooleanNo close button in the header.
      closeLabelclose-labelstringClose (text dialog.close)The close button's name, for screen readers.
      overlayBluroverlay-blurstringBlur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml).
      EventDescription
      ray-openAfter it opened.
      ray-closeAfter it closed; detail: { returnValue }.
      ray-request-closeEscape, backdrop or close button; cancelable (preventDefault keeps it open). detail: { source }.
      SlotDescription
      (default)Body.
      headerExtra header content, next to the title.
      footerActions, aligned to the end.
      PartDescription
      dialogThe native <dialog>.
      titleThe heading.
      descriptionThe line under the heading.
      headerThe header: title, description, the header slot and the close button.
      bodyThe scrollable body.
      footerThe footer.
      closeThe close button.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      dialog.closeClose
      dialog.confirm-labelAre you sure?
      dialog.confirmConfirm
      dialog.cancelCancel

      Drawer

      A 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.

      Patterns
      CartFrom the right: items you can change, a running total, the checkout pinned to the footer.
      Open
      FiltersFrom the left with a blurred backdrop; Apply reports what was picked.
      Open
      Mobile navigationA floating panel (floating, size="xs") with links and the account at the bottom.
      Open
      Build logFrom the bottom (size="18rem"), with the status in the header.
      Open
      Inspectormodeless: no backdrop, the page stays usable; the button toggles it.
      Toggle
      Unsaved changesEscape and the backdrop are refused (ray-request-close) while the note is edited.
      Open
      Positions and sizes
      start end top bottom xs md xl 40%
      3 items
      • ray-elements sticker pack$29.00
      • Mechanical keycap set$48.00
      • raylang mug$12.00
      Subtotal
      $101.00
      Shipping
      Free
      Total
      $101.00
      Keep shopping Check out
      Category
      Sort by
      Reset Apply
      Passed
      12:00:01 build started on runner-3
      12:00:02 resolving 14 dependencies
      12:00:04 compiled 42 modules
      12:00:04 warn unused import std/fs in src/sync.ray:3
      12:00:05 tests: 128 passed, 0 failed
      12:00:05 done in 4.1 s
      tag
      ray-card
      padding
      lg
      radius
      lg
      with-border
      true
      size
      320 × 184

      No backdrop and no scroll lock: keep scrolling the page while it is open. Escape or × closes it.

      No changes yet: Escape closes it.
      Discard Save

      position="end" · size="sm"

      Code

      <ray-drawer> · RayDrawer

      Any slotted element with data-dialog-close closes it. JS: show(), close(returnValue).

      PropertyAttributeTypeDefaultDescription
      openopen reflectsbooleanShown.
      labellabelstringHeading (also the accessible name).
      descriptiondescriptionstringA line under the title (the drawer's accessible description).
      positionposition reflectsend | start | right | left | top | bottomendThe edge it slides from: start/end follow the writing direction; left/right are sides of the screen.
      sizesize reflectsstringmdWidth (left/right) or height (top/bottom): xs…xl, full, content (as big as what it holds, up to the viewport: a bottom sheet) or any CSS length.
      modelessmodeless reflectsbooleanNo backdrop nor scroll lock: the page stays interactive (a side panel).
      floatingfloating reflectsbooleanDetached from the edge, with rounded corners.
      persistentpersistent reflectsbooleanEscape and backdrop clicks do not close it.
      hideClosehide-close reflectsbooleanNo close button in the header.
      closeLabelclose-labelstringClose (text drawer.close)The close button's name, for screen readers.
      overlayBluroverlay-blurstringBlur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml).
      EventDescription
      ray-openAfter it opened.
      ray-closeAfter it closed; detail: { returnValue }.
      ray-request-closeEscape, backdrop or close button; cancelable.
      SlotDescription
      (default)Body (scrolls).
      headerExtra header content.
      footerActions, at the bottom.
      PartDescription
      drawerThe native <dialog>.
      bodyThe body.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      drawer.closeClose

      Popover

      A floating panel anchored to a trigger, in the top layer; closes on Escape and outside clicks.

      Share, filters and a profile card
      Share
      Share “ray-remote”
      Invite
      • Ada Lovelaceada@ray.devOwner
      • Alan Turingalan@ray.devEditor
      Filters2
      Status
      ClearApply
      Follow
      Grace Hopper Compiler engineer. Writes the parts of raylang nobody sees.
      Following
      128
      Followers
      4.2k
      Reactions

      Alan Turing 10:42
      The new docs load in half the time. Nice work on the per-page modules!

      Placements, width and padding
      topplacement="top" rightplacement="right" bottomplacement="bottom" leftplacement="left" match-width: as wide as this buttonThe same width as its trigger. padding lg · offset 16More room, further away.
      Code

      <ray-popover> · RayPopover

      Positioned in JS (flip + shift to stay in the viewport). JS: show(), hide(), toggle().

      PropertyAttributeTypeDefaultDescription
      openopen reflectsbooleanShown.
      placementplacement reflectsbottom | bottom-start | bottom-end | top | top-start | top-end | left | left-start | left-end | right | right-start | right-endbottomPreferred side and alignment: top/bottom/left/right are sides of the screen; on top and bottom, -start/-end follow the writing direction (right to left, "bottom-start" lines up the right edges).
      offsetoffsetnumber8Gap to the trigger in px.
      anchor—objectWhat the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it.
      widthwidthstringPanel width (px number or CSS length). Default: its content.
      matchWidthmatch-widthbooleanAt least as wide as the trigger.
      paddingpadding reflects0 | xs | sm | md | lgmdPanel padding.
      trapFocustrap-focusbooleanMoves focus into the panel when opened and keeps Tab inside it.
      EventDescription
      ray-openAfter it opened.
      ray-closeAfter it closed (also by Escape or an outside click).
      SlotDescription
      triggerThe element that toggles it (gets aria-haspopup and aria-expanded).
      (default)Panel content.
      PartDescription
      dropdownThe panel.

      Tooltip

      A short hint on hover and focus of its child; the label also becomes the child's accessible description.

      An editor toolbar
      Help, truncated text and status
      API token
      • screenshot-2026-10-08-dark-theme-components-page.png1.8 MB
      • ray-remote-1.27.39-macos-arm64-signed.dmg42 MB
      Hover or focus a dot
      Placements
      top-start top top-end left right bottom-start bottom bottom-end
      Colors, delays and disabled
      default violet teal #db2777 open-delay 0 open-delay 800 close-delay 1000 disabled (click to enable)
      Code

      <ray-tooltip> · RayTooltip

      PropertyAttributeTypeDefaultDescription
      labellabelstringTooltip text.
      placementplacement reflectstop | bottom | left | right | top-start | top-end | bottom-start | bottom-endtopPreferred side; -start/-end follow the writing direction.
      openDelayopen-delaynumber300ms before showing.
      closeDelayclose-delaynumber0ms before hiding.
      colorcolorstringA palette color or any CSS color. Default: inverted foreground/background.
      disableddisabledbooleanNever shows.
      SlotDescription
      (default)The element the tooltip describes (one element).
      PartDescription
      tooltipThe tooltip box.

      Accordion

      Collapsible sections (WAI-ARIA accordion pattern); one open at a time, or several with multiple.

      Variants
      default No. ray build --native makes a single binary; ray run uses the VM for quick iterations. macOS, Linux and Windows on the desktop; iOS and Android through ray bundle. Yes: ray new app --frontend react-ts, then the @raylang/react wrappers.
      contained No. ray build --native makes a single binary; ray run uses the VM for quick iterations. macOS, Linux and Windows on the desktop; iOS and Android through ray bundle. Yes: ray new app --frontend react-ts, then the @raylang/react wrappers.
      separated No. ray build --native makes a single binary; ray run uses the VM for quick iterations. macOS, Linux and Windows on the desktop; iOS and Android through ray bundle. Yes: ray new app --frontend react-ts, then the @raylang/react wrappers.
      filled No. ray build --native makes a single binary; ray run uses the VM for quick iterations. macOS, Linux and Windows on the desktop; iOS and Android through ray bundle. Yes: ray new app --frontend react-ts, then the @raylang/react wrappers.
      Icons and descriptions
      Theme
      Turn on two-step verification to sign in with a code from your phone.
      Turn onLearn more
      Rich headers and content
      Build3 / 3
      • macOS arm644.2 MB
      • Linux x86_644.6 MB
      • Windows x86_645.1 MB
      Tests1 flaky

      ui: palette lists the menu commands passed on retry.

      PublishPending
      Publish 0.4.1
      Options
      chevron-position="start" · multiple main.ray, ui.ray, files.ray files_test.ray, ui_test.ray index.html, app.css, icon.png
      disabled item · value from code Up to 3 projects and 1 GB of builds. Unlimited projects, signed releases and an update channel. Shared projects and roles.
      Open Free Open Pro Close all
      Code

      <ray-accordion>

      PropertyAttributeTypeDefaultDescription
      valuevaluestringOpen item's value; with multiple, an array (attribute: comma-separated).
      multiplemultiple reflectsbooleanSeveral items may be open.
      variantvariant reflectsdefault | contained | separated | filleddefaultVisual style.
      chevronPositionchevron-position reflectsend | start | right | leftendSide of the chevron: start/end follow the writing direction; left/right are sides of the screen.
      EventDescription
      changeThe user opened or closed an item.
      SlotDescription
      (default)ray-accordion-item elements.

      <ray-accordion-item>

      PropertyAttributeTypeDefaultDescription
      valuevalue reflectsstringIdentifies the item in the accordion's value.
      labellabelstringHeader text (or slot=label).
      descriptiondescriptionstringA secondary line under the label, in the header.
      disableddisabled reflectsbooleanCannot be toggled.
      headingLevelheading-levelnumber3aria-level of the header.
      SlotDescription
      (default)Panel content.
      labelRich header content.
      leftIcon before the label.
      PartDescription
      controlThe header button.
      descriptionThe secondary line under the label.
      panelThe collapsible region.

      Attachment

      A file in a composer, upload list or chat: thumbnail or type icon, name, size, upload progress, error, remove and download.

      Code

      <ray-attachment>

      Assign a File to `file` to fill name, size, type and an image thumbnail. Removing it (× button) fires a cancelable ray-remove and then removes the element.

      PropertyAttributeTypeDefaultDescription
      namename reflectsstringFile name (ellipsized; full name in the tooltip).
      sizesizenumberSize in bytes, shown as "12 KB", "3.4 MB".
      typetype reflectsstringMIME type: picks the icon (image or file) and, with the name, the extension badge.
      srcsrcstringThumbnail URL for images (falls back to the icon if it fails to load).
      hrefhref reflectsstringMakes the name a download link.
      progressprogressnumberUpload progress 0–100: a thin bar and "Uploading… 45%". Unset: done.
      statusstatus reflectsuploading | done | errorExplicit state. Default: "uploading" while progress is set, else "done".
      errorerrorstringError text shown with status="error" (default "Upload failed").
      removableremovable reflectsbooleanShows a remove (×) button.
      removeLabelremove-labelstringRemove {name} (text attachment.remove)Accessible label of the remove button; {name} is replaced by the file name.
      variantvariant reflectsrow | cardrowrow: a compact chip; card: the thumbnail on top.
      disableddisabled reflectsbooleanDimmed, not removable, the name is not a link.
      EventDescription
      ray-removeThe remove button was pressed; cancelable (preventDefault keeps the element).
      PartDescription
      itemThe box.
      thumbnailThe thumbnail or icon box.
      badgeThe extension badge (PDF, PNG…).
      nameThe file name (a link with href).
      metaSize, upload state or error.
      progressThe upload progress bar.
      removeThe remove button.

      <ray-attachments>

      A wrapping row of ray-attachment elements.

      SlotDescription
      (default)ray-attachment elements.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      attachment.removeRemove {name}
      attachment.uploadingUploading…
      attachment.uploading-percentUploading… {percent}%
      attachment.progressUploading {name}
      attachment.failedUpload failed

      Avatar

      An image, the initials of a name, or a placeholder icon.

      Code

      <ray-avatar> · RayAvatar

      PropertyAttributeTypeDefaultDescription
      srcsrc reflectsstringImage URL; falls back to initials if it fails to load.
      altalt reflectsstringAccessible name (default: name).
      namename reflectsstringPerson or entity name; its initials are shown without an image.
      colorcolorstringA palette color or any CSS color.
      variantvariant reflectslight | filled | outline | defaultlightStyle of the initials/placeholder.
      sizesize reflectsxs | sm | md | lg | xlmdDiameter.
      radiusradiusxs | sm | md | lg | xl | fullCorner radius. Default: full.
      SlotDescription
      (default)Custom content (e.g. an icon) instead of initials.
      PartDescription
      avatarThe box.
      imageThe <img>.

      Badge

      A short status label.

      Variants × colors
      primarygrayredgreenyellowviolet light (default)InfoDraftFailedPassedPendingBeta filledInfoDraftFailedPassedPendingBeta outlineInfoDraftFailedPassedPendingBeta dotInfoDraftFailedPassedPendingBeta defaultNeutral————— gradientNew—————

      default is the neutral surface and ignores color; gradient takes gradient="from to [deg]".

      Gradient
      Theme pink → orange teal → blue
      Sizes
      Extra small Small Medium Large Extra large
      Radius and case
      xs sm md lg full (default) v1.27.37 · normal-case
      In context
      • ray-remote · build #412Online
      • rayauth · build #108Failed
      • ray-elements · release 0.5.0Pending
      Inbox3 Releasesv0.5
      Code

      <ray-badge> · RayBadge

      PropertyAttributeTypeDefaultDescription
      variantvariant reflectslight | filled | outline | dot | default | gradientlightVisual style.
      gradientgradient reflectsstringWith variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
      colorcolorstringA palette color or any CSS color.
      sizesize reflectsxs | sm | md | lg | xlsmHeight and font size.
      radiusradiusxs | sm | md | lg | xl | fullCorner radius. Default: full.
      normalCasenormal-casebooleanKeeps the text as written instead of uppercase.
      SlotDescription
      (default)The text.
      PartDescription
      badgeThe badge box.

      Blockquote

      A quotation set apart from the text (Mantine's Blockquote): a colored edge, a quote mark on it and the attribution below. A real <blockquote> inside, with the source's URL as its cite.

      Default
      The most dangerous phrase in the language is "We've always done it this way."
      Variants and colors
      Simplicity is prerequisite for reliability. The best way to predict the future is to invent it. The more I study, the more insatiable do I feel my genius for it to be. A closure stored in a variable cannot cross a fiber boundary in a native build.
      Spacing and edge
      Compact, for dense panels and sidebars. Roomy, for a quote that leads a section. Only the tint and the mark, no colored edge. The plainest one: a bordered box.
      A testimonial

      We moved our desktop tools to raylang and ray-elements in a week. The components looked right on day one, in light and dark, and the forms just worked.

      Katherine JohnsonEngineering lead, Orbit Labs
      Verified customer
      In an article

      Why the web components are form-associated

      Every field of ray-elements takes part in its <form> like a native control: it is submitted under its name, validated, reset and disabled by a fieldset.

      Form-associated custom elements enable web authors to define and create custom elements which participate in form submission.

      That is why a FormData built from a form full of ray-elements fields has every value in it, with no glue code.

      Code

      <ray-blockquote> · RayBlockquote

      Paragraphs in it are spaced and the last one has no bottom margin. The attribution is text (cite) or rich content (slot="cite": an avatar, a name, a role).

      PropertyAttributeTypeDefaultDescription
      citecitestringWho said it, shown below the quote ("— Grace Hopper").
      hrefhrefstringURL of the source: the inner blockquote's cite attribute.
      colorcolor reflectsstringA palette color or any CSS color, for the edge, the mark and the tint. Default: the primary.
      variantvariant reflectslight | outline | filledlightlight: tinted background; outline: border and edge only; filled: solid color (a pull quote).
      iconiconstringquoteRegistry icon of the mark, or none. The icon slot replaces it.
      sizesize reflectssm | md | lgmdText size (lg for a pull quote).
      paddingpadding reflectsstringInner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md.
      hideEdgehide-edge reflectsbooleanNo colored edge on the start side (the tint, border and mark stay).
      radiusradius reflectsstringCorner radius: xs…xl, none, or a CSS length. Default: md.
      SlotDescription
      (default)The quotation (text or paragraphs).
      citeRich attribution, instead of cite.
      iconA custom mark, instead of icon.
      PartDescription
      quoteThe <blockquote>.
      iconThe disc with the mark.
      citeThe attribution (a <figcaption>).

      Code

      A block of source code: header with file name and language, copy button, line numbers, highlighted lines, diff lines, wrapping and a "show more" height. A small built-in highlighter, or any library through setHighlighter(), painted with the --ray-code-* tokens.

      A file
      Languages
      Terminal, diff and long code
      Data as it came

      verbatim shows and copies the text untouched: a response body or a log keeps its indentation and its blank last line.

      Bring your own highlighter

      setHighlighter() hands every block to a library; its classes are painted with the ray-elements tokens, so the colors stay the same. Returning nothing falls back to the built-in one.

      Code

      <ray-code> · RayCode

      The code comes from the code property, a <script type="text/plain"> child (raw text: anything but a closing script tag), a <template> child (parsed as HTML: the easiest for markup, but a < that is not a tag, as in Promise<void>, breaks it), or the element's text; common indentation and blank edges are removed (not with verbatim). Built-in languages: js/ts (jsx, tsx), json, html/xml/svg/vue, css, shell, ray and diff; others show as plain text. Library classes painted with the tokens: Prism's .token.*, highlight.js's .hljs-*, and Shiki's css-variables theme.

      PropertyAttributeTypeDefaultDescription
      code—stringThe code, from script (the most convenient in React and Vue). Wins over the content.
      languagelanguage reflectsstringThe language: js, ts, jsx, tsx, json, html, xml, svg, vue, css, sh, ray, diff… (also shown in the header). Not lang: that is the human language of the text.
      filenamefilenamestringA file name or title in the header; also the scroll region's accessible name.
      lineNumbersline-numbers reflectsbooleanNumbers each line (not copied, not selectable).
      highlighthighlightstringLines to highlight: "3, 5-7".
      wrapwrap reflectsbooleanWraps long lines instead of scrolling sideways.
      verbatimverbatim reflectsbooleanShows and copies the text exactly as given: no common indentation or blank first and last lines removed. For data (a response body, a log) rather than code written in the page.
      maxHeightmax-heightstringHeight before it scrolls: px as a number, or a CSS length. A taller block gets a "Show all N lines" button.
      expandedexpanded reflectsbooleanShown whole, past max-height.
      hideCopyhide-copy reflectsbooleanNo copy button.
      hideHeaderhide-header reflectsbooleanNo header bar (the copy button floats in the corner).
      sizesize reflectsxs | sm | mdsmFont size.
      radiusradius reflectsstringCorner radius: xs…xl, none, or a CSS length. Default: md.
      copyLabelcopy-labelstringCopy code (text code.copy)Accessible name of the copy button.
      copiedLabelcopied-labelstringCopied (text code.copied)Shown and announced after copying.
      EventDescription
      ray-copyThe code was copied.
      SlotDescription
      (default)The code: text, a <template> or a <script type="text/plain">.
      PartDescription
      frameThe box.
      headerThe bar with the file name, the language and the copy button.
      copyThe copy button.
      scrollerThe scroll box (focusable, to scroll with the keyboard).
      codeThe <code> with one .line per line.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      code.copyCopy code
      code.copiedCopied
      code.regionCode
      code.region-language{language} code
      code.show-allShow all {count} lines
      code.show-lessShow less

      Icon

      An icon of the registry: the whole set (the components' too) changes with setIcons().

      Registered icons

      Click an icon to copy its markup. The same registry draws the components' own icons (dialog close, select chevron, alert status…).

      Sizes
      xs sm md lg xl 2.5rem
      Stroke
      1 1.5 2 (default) 2.5
      Filled: a state
      Outline at rest, filled when on: <ray-icon name="star" filled>. The current tab of a ray-bottom-nav draws its icon filled.
      Colors
      blue green yellow red violet #0ea5e9
      In context
      New project Export Passing

      Inline with text, an icon follows the font: run ray test, then open report.html.

      Swap the set
      Filled set Replaces icons app-wide: the gallery above and every component follow.
      Code

      <ray-icon> · RayIcon

      setIcons({ name: '<svg…>' }) replaces or adds icons (SVG markup or an SVGElement, drawn with currentColor); iconNames() lists them. An icon may have a filled version for a state (filled; "<name>:filled" in setIcons; iconNames({ filled: true }) lists them). The components draw roles ("ui.close", "ui.remove", "ui.expand"…; iconAliases()), each its glyph until the app registers the role: setIcons({ "ui.remove": … }) changes only the chips' ×. Sizes follow the font unless size; --ray-icon-size and --ray-icon-stroke tune the whole system.

      PropertyAttributeTypeDefaultDescription
      namename reflectsstringRegistered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
      filledfilled reflectsbooleanThe filled version, for a state (active, selected, favorite, unread); the outline icon when there is none. Built in: user, info, circle-check, alert-triangle, circle-x, folder, bell, star, settings, home, message-circle.
      mirrormirror reflectsbooleanMirrored in a right-to-left context (dir="rtl"), for an icon that points along the text: back, forward, send, undo. The roles that do (ui.next, ui.previous, ui.first, ui.last, ui.disclosure, ui.separator) mirror by themselves.
      sizesize reflectsstringxs…xl or any CSS length. Default: --ray-icon-size, else 1em (the font).
      labellabelstringAccessible name; without it the icon is decorative (hidden from screen readers).
      colorcolor reflectsstringA palette color or any CSS color. Default: the text color.
      strokestrokenumberStroke width for stroke icons (default: --ray-icon-stroke, 2).
      PartDescription
      iconThe icon box.

      Indicator

      A 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. Nine positions, an inward offset, palette or CSS colors, a border and a live pulse.

      On anything
      Inbox
      Native buildsray build --native

      Messages  

      Status
      ray-remote · screen
      Syncing
      Positions
      Counts, colors and sizes
      + 25 Mark read
      Code

      <ray-indicator> · RayIndicator

      Wraps its content as tight as it is (fit-content). The label is part of the element's text for assistive technology; a dot has none: describe it on the content (aria-label="Grace, online").

      PropertyAttributeTypeDefaultDescription
      labellabelstringText in the indicator (a word or a count). Empty: a dot.
      positionposition reflectstop-start | top-center | top-end | middle-start | middle-center | middle-end | bottom-start | bottom-center | bottom-endtop-endWhich point of the content's box it sits on.
      offsetoffsetstringMoves it inward from that point: px as a number, or a CSS length. Use it on round content (an avatar), so it sits on the curve.
      colorcolor reflectsstringA palette color or any CSS color. Default: the primary.
      sizesizestringDiameter of the dot (and minimum height of a label): px as a number, or a CSS length. Default: 10px.
      radiusradius reflectsstringCorner radius: xs…xl, none, or a CSS length. Default: round.
      maxmaxnumberA numeric label above it shows as max+ (99+).
      inlineinline reflectsbooleaninline-block, to sit within a line of text.
      withBorderwith-border reflectsbooleanA ring in the background color, to separate it from the content.
      processingprocessing reflectsbooleanA pulse around it (live, recording, syncing).
      disableddisabled reflectsbooleanHides the indicator (the content stays).
      SlotDescription
      (default)The element the indicator sits on.
      PartDescription
      indicatorThe dot or label.

      Kbd

      A keyboard key: a raised keycap, or a flat chip (filled or outline) for hints in menus and buttons.

      default⌘ShiftP
      filled⌘ShiftP
      outline⌘ShiftP

      Open the command palette with ⌘ + Shift + P.

      Search ⌘K Save ⌘S
      Code

      <ray-kbd> · RayKbd

      PropertyAttributeTypeDefaultDescription
      sizesize reflectsxs | sm | md | lg | xlsmFont size.
      variantvariant reflectsdefault | filled | outlinedefaultdefault: raised keycap; filled: flat muted chip; outline: flat with a border.
      SlotDescription
      (default)The key name.
      PartDescription
      kbdThe inner <kbd>.

      Meter also 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.

      A mixer: a fader with its scale and a stereo meter per track, both on a desk's curve (taper="fader"; a test signal, no audio)
      0.0 dB
      Drums
      -6.0 dB
      Bass
      -12.0 dB
      Keys
      4.0 dB
      Master
      The meter's own scale (scale), when there is no fader
      Horizontal, with its own scale
      Clear the clip marks
      Code

      <ray-meter> · RayMeter

      Levels are dB (20 * log10 of the amplitude; -Infinity for silence). A peak goes up at once and falls at falloff dB/s, so call setLevels() on every frame; the hold line keeps the highest peak for hold ms. The bars are role=meter, its value (the loudest channel) updated a few times a second. Colors: --ray-meter-low, --ray-meter-mid, --ray-meter-high; length: the host's height (--ray-meter-length, 12rem), or its width when horizontal. Beside a fader (ray-slider orientation="vertical"), give both the same height and the meter --ray-meter-inset: half the slider's thumb length (0.4375rem for thumb="cap", 0.5625rem for the round one): and the same taper: its bars then line up with the slider's marks, which carry the numbers; leave the meter's own scale off.

      PropertyAttributeTypeDefaultDescription
      minminnumber-60The dB at the bottom: lower levels show nothing.
      maxmaxnumber6The dB at the top.
      warnwarnnumber-12Where the yellow zone starts (dB).
      dangerdangernumber-3Where the red zone starts (dB).
      clipclipnumber0A peak at or over it (dB) marks the channel as clipped (a red band at the top of its bar) until resetClip(), reset() or a click on the bar.
      channelschannelsnumber1The bars: 1 (mono), 2 (stereo)…
      orientationorientation reflectsvertical | horizontalverticalvertical: bars that rise, the scale before them (on the left, aligned against them); horizontal: bars that grow towards the inline end.
      sizesize reflectsxs | sm | md | lgsmThe thickness of each bar.
      holdholdnumber1500How long the peak hold line stays (ms); 0: no line.
      fallofffalloffnumber24How fast a lower level falls (dB per second); 0: at once.
      scalescale reflectsbooleanShows the dB scale on the left of the bars (6, 0, -6, -12, -24, -36, -48, -60 within min and max). Part of the meter, and optional: beside a fader, put the numbers on the fader (its marks) instead.
      tapertaper reflectslinear | faderlinearHow the dB spread along the bar: linear, or fader (a mixing desk's curve, as ray-slider taper="fader"): beside a fader with that taper, give both the same one and the bars line up with its marks. The zones (warn, danger) and the scale follow it.
      marks—arrayYour own scale, in dB (replaces the one of scale).
      labellabelstringLevel (text meter.label)The accessible name.
      EventDescription
      ray-clipA channel's peak reached clip (once until its mark is cleared).
      PartDescription
      channelsThe bars (role=meter).
      channelOne channel (data-clipped when clipped).
      trackA bar's track.
      peakThe peak level (translucent).
      rmsThe RMS level (solid).
      holdThe peak hold line.
      scaleThe dB scale.
      tickA label of the scale.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      meter.labelLevel
      meter.value{value} dB
      meter.silentSilence

      QR code also 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. Its own encoder, no dependencies (about 3 KB gzip, only where imported); a logo at the middle; toSVG() and toPNG() to save or share it.

      Open on your phone: type a link, the code follows

      Download PNG Download SVG
      Two-step sign-in: the code, and the key as text for who cannot scan

      Scan it with your authenticator app, or type this key:

      JBSW Y3DP EHPK 3PXP
      A logo at the middle (the error correction goes up to H), colors, sizes
      Code

      <ray-qr> · RayQr

      Dark on light whatever the theme (scanners need it): --ray-qr-color and --ray-qr-background (or color and background) change them, keep the modules darker. The smallest version that holds the text is used, and the error correction raised while it still fits (a stronger code, same size). Text: UTF-8, as phones read it. The encoder alone: import { qrMatrix } from "@raylang/elements/qr".

      PropertyAttributeTypeDefaultDescription
      valuevaluestringThe text or link to encode. Empty: nothing is drawn.
      eccecc reflectsL | M | Q | HMError correction, the least used (raised when it costs no size): L recovers 7 % of the code, M 15 %, Q 25 %, H 30 %. With a logo, always H.
      sizesize reflectsstringmdThe side, quiet zone included: xs (4rem), sm (6rem), md (8rem), lg (12rem), xl (16rem), or any CSS length.
      quietZonequiet-zonenumber4The light margin around the code, in modules (the standard asks for 4; 2 reads well on a plain background).
      colorcolorstringThe modules' color: a palette color or any CSS color (default black). Keep it dark.
      backgroundbackgroundstringThe background, any CSS color (default white). Keep it light.
      labellabelstringIts accessible name (default "QR code", translated). Say what it is for ("Scan to open on your phone"), and show the link or code as text too: not everyone can scan.
      EventDescription
      ray-errorThe value does not fit in a QR code (over about 2,900 bytes at L); nothing is drawn.
      SlotDescription
      (default)A logo for the middle (an <img> or an <svg>), on the background color, 22 % of the code's side.
      PartDescription
      codeThe <svg>.
      backgroundThe background rectangle.
      modulesThe path of the dark modules.
      logoThe logo's box.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      qr.labelQR code

      Stat

      A metric tile: label, value, change against a previous period, note.

      Code

      <ray-stat> · RayStat

      PropertyAttributeTypeDefaultDescription
      labellabelstringWhat is measured.
      valuevaluestringThe figure, already formatted.
      diffdiffnumberChange (positive is shown as good, in green; see inverse).
      diffUnitdiff-unitstring%Unit of diff.
      notenotestringA line under the value (compared to…).
      inverseinverse reflectsbooleanLower is better (errors, latency): negative diffs are green.
      plainplain reflectsbooleanWithout the card around.
      SlotDescription
      iconIcon next to the label.
      (default)Extra content (e.g. a ray-progress).

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      stat.upUp {value}
      stat.downDown {value}
      stat.flatNo change {value}

      Table

      A data table from columns and data: sorting (aria-sort), row selection, clickable rows, sticky header, striped, empty state. Plain HTML tables: the .ray-table class of base.css.

      Click a row, sort a column, or select rows.

      Deploy a release to see it here.
      Plain HTMLclass="ray-table"
      Server-renderedNo JavaScript
      rayauthUsers list
      Code

      <ray-table> · RayTable

      Cells are text (render may return a DOM node; strings are never parsed as HTML). The cells live in the shadow tree, so page CSS does not reach a td: style them with ::part(th), ::part(td) and a column's part (column.part = "mono": ray-table::part(mono) { font-family: var(--ray-font-family-mono) }). The scroll height comes from --ray-table-max-height; the sticky header's background from --ray-table-header-background (default: --ray-surface, which ray-dialog, ray-drawer and ray-card set, else --ray-background); a selected row's from --ray-table-selected-background (default --ray-primary-light; transparent leaves the checkbox alone to show it).

      PropertyAttributeTypeDefaultDescription
      columns—arrayColumns: key, label, width, align, sortable, part (an extra part name for its th and td cells), render(row, index), sort(a, b).
      data—arrayRows (objects).
      rowKeyrow-keystringidField that identifies a row (selection).
      selectableselectable reflectsbooleanA checkbox per row and a select-all checkbox.
      selection—arrayKeys of the selected rows.
      sort—stringCurrent sort; set it, or let header clicks change it.
      manualSortmanual-sortbooleanDo not sort here: listen to ray-sort and pass sorted data.
      clickableRowsclickable-rows reflectsbooleanRows are focusable and fire ray-row-click (Enter too; arrows move between rows).
      stripedstriped reflectsbooleanAlternate row background.
      withBorderwith-border reflectsbooleanBorder around the table.
      withColumnBorderswith-column-borders reflectsbooleanBorders between columns.
      stickyHeadersticky-header reflectsbooleanThe header stays visible while scrolling (with --ray-table-max-height).
      noHoverno-hover reflectsbooleanNo row highlight on hover.
      densitydensity reflectsxs | sm | md | lgsmCell padding.
      labellabelstringCaption (also the table's accessible name).
      emptyLabelempty-labelstringNo data (text table.empty)Text without rows (or put a ray-empty-state in slot=empty).
      EventDescription
      ray-sortA header changed the sort.
      ray-selection-changeThe selection changed.
      ray-row-clickA row was clicked or activated with Enter (clickable-rows).
      SlotDescription
      emptyShown instead of the empty text when there are no rows.
      PartDescription
      tableThe <table>.
      scrollThe scroll container.
      thEvery header cell (also named by its column's part).
      tdEvery body cell (also named by its column's part).

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      table.emptyNo data
      table.select-allSelect all rows
      table.select-rowSelect row {index}

      Timeline

      Events in order along a line (Mantine's Timeline): activity, history, a deploy's stages. Items up to active are reached (filled bullet, colored line); a bullet is a dot, an icon or an avatar.

      A deploy, in progress
      Compiled 42 modules on runner-3. Unit, browser and visual tests. Bundles for macOS, Linux and Windows. Publishes update.json to the stable channel. active is the last reached item: the bullets fill and the line colors up to it. ← Back Advance → Fail the upload
      Activity, with avatars
      “Per-page modules” into main.
      The docs load in half the time now.
      On #482 12 files changed.
      Right-aligned, colors, line variants
      Code

      <ray-timeline>

      A list (role="list") of ray-timeline-item.

      PropertyAttributeTypeDefaultDescription
      activeactive reflectsnumber-1Index of the last reached item (-1: none).
      alignalign reflectsstart | end | left | rightstartSide of the line: start/end follow the writing direction; left/right are sides of the screen.
      bulletSizebullet-sizestringBullet size: px as a number or a CSS length (default 20px).
      lineWidthline-widthnumberLine width in px (default 2).
      colorcolor reflectsstringA palette color or any CSS color for what is reached (default: primary).
      reverseActivereverse-active reflectsbooleanCounts active from the end (the latest event at the top).
      SlotDescription
      (default)ray-timeline-item elements.

      <ray-timeline-item>

      PropertyAttributeTypeDefaultDescription
      labellabelstringThe title of the event.
      timetimestringWhen ("2 h ago", a date).
      iconiconstringAn icon of the registry in the bullet.
      colorcolor reflectsstringIts own color (a failed step in red).
      lineVariantline-variant reflectssolid | dashed | dottedsolidThe line to the next item (dashed: not happened yet).
      SlotDescription
      (default)Details under the title.
      bulletA custom bullet (an avatar, an image).
      PartDescription
      bulletThe bullet.
      lineThe line to the next item.
      bodyTitle, details and time.
      titleThe title.
      timeThe time.

      Alert

      An inline message: title, text, an icon of the registry, the color variants and an optional close button.

      raylang 1.27.37 is out: run ray upgrade. ray-remote 0.4.1 is ready to publish. 64 MB left on the build volume. The signing key was not found. A quiet note without icon nor title.
      Code

      <ray-alert> · RayAlert

      Announced as an alert. The icon follows the color (info, circle-check, alert-triangle, circle-x) unless icon or slot=icon.

      PropertyAttributeTypeDefaultDescription
      labellabelstringTitle.
      colorcolor reflectsstringA palette color or any CSS color.
      variantvariant reflectslight | filled | outline | default | transparentlightVisual style.
      radiusradiusxs | sm | md | lg | xlCorner radius.
      iconicon reflectsstringA registered icon name, or none.
      closableclosable reflectsbooleanA close button; closing hides the alert (cancel ray-close to keep it).
      closeLabelclose-labelstringDismiss (text alert.close)Accessible name of the close button.
      EventDescription
      ray-closeThe close button was pressed; cancelable.
      SlotDescription
      (default)Text.
      iconA custom icon.
      PartDescription
      alertThe box.
      closeThe close button.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      alert.closeDismiss

      Empty state

      What a list, table or pane shows when it is empty: icon, title, text and the action that fills it.

      Create a project to start building with raylang. New project Import
      Code

      <ray-empty-state> · RayEmptyState

      PropertyAttributeTypeDefaultDescription
      labellabelstringTitle.
      compactcompact reflectsbooleanLess padding.
      withBorderwith-border reflectsbooleanDashed border.
      SlotDescription
      (default)Text.
      iconIcon, shown in a circle.
      actionsButtons.

      Notification

      Toasts: notify(), updateNotification(), hideNotification(), clearNotifications(); shown in a ray-toaster (a polite live region in the top layer). ray-notification is usable on its own.

      Notify With an action Loading → done Error
      ray-remote 0.4.1 is ready to publish. type error at 12:5: 'f' expects 2 argument(s) update.json is signed with a key that expires in 7 days. ray 0.9 is available. bundle-macos-arm64.zip Sunday, December 3 at 9:00 AM

      Several toasts stack; hover (or tap, on touch screens) to spread them. Swipe one sideways to dismiss it.

      Code

      <ray-notification>

      notify({ id, title, message, color, icon, loading, autoClose (ms, default 4000; false = stays), closable, withBorder, onClose }) returns its id. A color adds a status icon in that color: green/teal a check, red/pink an error, yellow/orange a warning, others info. The status icon and the loader are 1.5rem with a 1.5 stroke; set --ray-notification-icon-size and --ray-notification-icon-stroke to change them.

      PropertyAttributeTypeDefaultDescription
      labellabelstringTitle.
      colorcolor reflectsstringStatus color: tints the status icon (and a slotted icon's circle).
      iconiconstringStatus icon from the registry (default: from the color); "none" for no icon.
      loadingloading reflectsbooleanShows a spinner (notify() does not auto-close it).
      hideClosehide-close reflectsbooleanNo close button.
      withBorderwith-border reflectsbooleanDraws a border.
      actionLabelaction-labelstringText of an action button (e.g. "Undo"); pressing it fires ray-action.
      actionIcon—objectBefore the action's text: an icon name, or a node (a <ray-pulse> while an alarm rings).
      actions—objectSeveral action buttons (e.g. "Taken" and "Snooze"); replaces actionLabel. Each takes a button variant (default "default"; "filled" marks the main answer), a color (default the notification's) and a name (adds the part action-<name>). Pressing one fires ray-action with its index.
      EventDescription
      ray-closeThe close button was pressed.
      ray-actionAn action button was pressed; detail.index says which (notify() runs its onClick and closes it).
      SlotDescription
      (default)Message.
      actionYour own action controls (ray-button…), beside the close button, after the action buttons.
      iconYour own icon, in a colored circle (replaces the status icon).
      PartDescription
      actionsThe row of action buttons and the action slot.
      actionEach action button. Each also has the part action-<index> (action-0, action-1…) and, with a name, action-<name>, to style one alone.
      status-iconThe status icon.

      <ray-toaster>

      Created by notify() when missing; add one yourself to choose its position. A stack (newest in front, older ones peeking behind) that spreads into a list on hover or keyboard focus; on touch screens a tap expands it, a tap outside collapses it, and a sideways swipe dismisses a toast. Auto-close pauses while expanded. Full width on phones.

      PropertyAttributeTypeDefaultDescription
      positionposition reflectsbottom-end | bottom-start | bottom-center | top-end | top-start | top-center | bottom-right | bottom-left | top-right | top-leftbottom-endCorner of the stack: -start/-end follow the writing direction; -left/-right are sides of the screen.
      limitlimitnumber5Maximum kept; the oldest go first.
      visiblevisiblenumber3Toasts shown in the collapsed stack (the rest wait, hidden).
      expandexpand reflectsbooleanAlways expanded: a list instead of a stack.
      gapgapnumber12Pixels between toasts when expanded.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      notification.closeClose notification
      notification.regionNotifications

      Progress

      A determinate or (without value) indeterminate progress bar, announced as a progressbar.

      Code

      <ray-progress> · RayProgress

      PropertyAttributeTypeDefaultDescription
      valuevaluenumberProgress, from 0 to max. Unset: indeterminate.
      maxmaxnumber100The value of a full bar.
      colorcolor reflectsstringA palette color or any CSS color.
      sizesize reflectsxs | sm | md | lg | xlmdBar height.
      radiusradiusxs | sm | md | lg | xl | fullCorner radius. Default: full.
      stripedstriped reflectsbooleanDiagonal stripes.
      animatedanimated reflectsbooleanMoving stripes (with striped).
      showValueshow-value reflectsbooleanShows the percentage: inside the bar on lg and xl, beside it on smaller sizes.
      labellabelstringAccessible name (default: Progress).
      PartDescription
      trackThe background track.
      barThe filled bar.
      valueThe percentage beside the bar (show-value on xs, sm, md).

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      progress.labelProgress

      Pulse

      An indeterminate wait indicator softer than the spinner: circles that breathe or ripple, announced as a status.

      Code

      <ray-pulse> · RayPulse

      Four presets (variant), each a bundle of count, shape, fade and direction, which override it one by one. The rest is tuned with custom properties on the element: --ray-pulse-cycle (one cycle, default 1.6s; doubled with reduced motion), --ray-pulse-floor (opacity of the largest of concentric filled circles, 0 to 1, default 0.2), --ray-pulse-scale (where a cycle starts, 1 = full size; default per variant) and --ray-pulse-stagger (how much of the cycle separates the phases of the circles, 0 together to 1 spread evenly; default per variant).

      PropertyAttributeTypeDefaultDescription
      variantvariant reflectscluster | breathe | ripple | dotsclusterThe figure: cluster (three concentric circles breathing out of phase), breathe (one dot over a halo), ripple (rings expanding from a dot) or dots (three in a row, in sequence).
      countcount reflectsnumberNumber of circles, 1 to 5 (more are clamped). Default: the variant's.
      shapeshape reflectsfilled | ringFilled discs (concentric ones fade with size, see --ray-pulse-floor) or outlined rings. Default: the variant's.
      fadefade reflectsout | noneWhether a cycle ends transparent; the bare attribute means out. Default: the variant's (ripple and dots fade).
      directiondirection reflectsalternate | normalalternate goes there and back; normal goes one way and restarts (with fade: the ripple). Default: the variant's.
      colorcolor reflectsstringA palette color or any CSS color. Default: the primary color.
      sizesize reflectsxs | sm | md | lg | xlmdHeight of the figure (the dots variant is wider).
      labellabelstringLoading (text pulse.label)Text read by screen readers.
      PartDescription
      pulseThe box holding the circles.
      dotEach circle (the static center of ripple is also part core).

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      pulse.labelLoading

      Ring progress

      Progress as a ring (Mantine's RingProgress), with content in the middle: a countdown, a goal, an upload. Announced as a progressbar.

      A countdown: the value goes down
      3:00
      Round 4 / 12
      Start

      value from 100 to 0; the clock is the default slot.

      Sizes, colors and the percentage

      Without value the arc spins (indeterminate).

      A goal: value of max
      6,400
      of 10,000 steps
      Code

      <ray-ring-progress> · RayRingProgress

      The arc starts at 12 o'clock and runs clockwise; a countdown is a value that goes down. Without value it spins (indeterminate). The middle holds the default slot (a clock), or the percentage with show-value.

      PropertyAttributeTypeDefaultDescription
      valuevaluenumberProgress, from 0 to max. Unset: indeterminate (a spinning arc).
      maxmaxnumber100The value of a full ring.
      colorcolor reflectsstringA palette color or any CSS color. Default: the primary color.
      sizesize reflectsstringmdDiameter: xs…xl (3, 5, 7.5, 10, 12.5rem) or any CSS length.
      thicknessthickness reflectsstringWidth of the ring: a CSS length (a bare number is px). Default: a tenth of the diameter.
      roundCapsround-caps reflectsbooleanRounded ends of the arc.
      showValueshow-value reflectsbooleanShows the percentage in the middle (when the default slot is empty).
      labellabelstringAccessible name (default: Progress).
      SlotDescription
      (default)The middle of the ring (a clock, a figure, an icon); its font scales with size.
      PartDescription
      trackThe background circle.
      barThe arc.
      centerThe middle, around the default slot.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      ring-progress.labelProgress

      Skeleton

      A placeholder while content loads: a shimmering block, a circle or text lines; with loaded it shows its content.

      ray-remote 0.4.1 is ready. Toggle loaded
      Code

      <ray-skeleton> · RaySkeleton

      aria-busy="true" on the host while loading; the placeholder is aria-hidden.

      PropertyAttributeTypeDefaultDescription
      widthwidthstringWidth (CSS length, a number is px). Default: 100% (a circle: 2.5rem).
      heightheightstringHeight of a block or of each line (CSS length, a number is px). Default: 1rem.
      circlecircle reflectsbooleanA circle (avatar placeholder): its diameter is width, else height.
      lineslines reflectsnumberNumber of text lines (the last one is shorter).
      radiusradius reflectsstringCorner radius: xs…xl, full or a CSS length. Default: sm.
      animationanimation reflectsshimmer | pulse | noneshimmerThe loading effect (always none with reduced motion).
      loadedloaded reflectsbooleanShows the slotted content instead of the placeholder.
      SlotDescription
      (default)The real content, shown with loaded.
      PartDescription
      skeletonThe placeholder container.
      boneEach block or line.

      Spinner

      An indeterminate loading indicator, announced as a status.

      Code

      <ray-spinner> · RaySpinner

      PropertyAttributeTypeDefaultDescription
      colorcolorstringA palette color or any CSS color. Default: the primary color.
      sizesize reflectsxs | sm | md | lg | xlmdDiameter.
      labellabelstringLoading (text spinner.label)Text read by screen readers.
      PartDescription
      spinnerThe ring.

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      spinner.labelLoading

      Step dots

      A row of dots, one per step: done, current, to do. A compact progress for rounds, onboarding pages or a quiz; announced as a progressbar ("Round 4 of 12").

      Rounds of a timer
      Previous Next
      Another language: value-text

      Announced «Asalto 3 de 8»: {step} and {count} are replaced, the numbers follow the page's language.

      Sizes, colors and alignment

      value is the current step from 0; value = count: all done.

      Code

      <ray-step-dots> · RayStepDots

      Dots before value are done (filled), the one at value is current (a filled pill), the rest are to do (empty). Not interactive: for steps the user picks, use ray-stepper (or the dots of ray-carousel). Many dots wrap onto more lines.

      PropertyAttributeTypeDefaultDescription
      countcountnumber0Number of steps (dots).
      valuevaluenumber0The current step, 0-based; count means every step is done.
      colorcolor reflectsstringA palette color or any CSS color for done and current dots. Default: the primary color.
      sizesize reflectsxs | sm | md | lg | xlsmSize of a dot.
      alignalign reflectsstart | center | endcenterWhere the row sits in its width.
      labellabelstringWhat a step is called: "Round" is announced "Round 4 of 12" and names the element. Default: Step (named Steps). In another language, use value-text.
      valueTextvalue-textstringThe announced text, {step} (the current one, from 1) and {count} replaced, numbers in the page's language: value-text="Asalto {step} de {count}". Default: "<label> {step} of {count}".
      doneTextdone-textstringThe announced text once every step is done (value = count), with {count}. Default: value-text, else "{count} of {count}, done".
      PartDescription
      dotsThe row.
      dotEach dot ([data-state] done, current or todo).

      Texts

      What it writes itself, in English; setStrings() translates them (Getting started: Languages).

      KeyEnglish
      step-dots.labelSteps
      step-dots.value{label} {step} of {count}
      step-dots.stepStep
      step-dots.done{count} of {count}, done

      App bar

      The 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. It elevates once the content scrolls, or hides while scrolling down.

      Patterns (scroll inside each phone)
        Back, title and subtitle, actions; elevates once it scrolls
        Cancel Done
          center (iOS) and scroll-behavior="hide": away going down, back going up
            variant="filled" with a search row (the bottom slot)
              size="lg" with a segmented control under it
              Code

              <ray-app-bar> · RayAppBar

              It follows the scroller of its ray-app-shell, else scroll-target, else the window; clear of the notch (safe-area inset). The title is plain text: put a heading in the default slot when the page needs one.

              PropertyAttributeTypeDefaultDescription
              labellabelstringThe title.
              descriptiondescriptionstringA line under the title.
              centercenter reflectsbooleanThe title centered (iOS).
              variantvariant reflectsdefault | filled | transparentdefaultdefault: the page background; filled: the primary color; transparent: until it elevates.
              sizesize reflectssm | md | lgmdHeight: 48, 56 or 64 px.
              scrollBehaviorscroll-behavior reflectselevate | hide | noneelevateWhile the content scrolls: elevate (border and shadow), hide (also slides away going down, back going up), none.
              stickysticky reflectsbooleanSticks to the top of the window (outside a shell).
              scrollTargetscroll-targetstringA selector of the element whose scrolling it follows (default: its shell's, else the window).
              SlotDescription
              (default)Title content after the label (a heading, a select).
              startBefore the title: back or menu button.
              endActions.
              bottomA row under the bar: tabs, a search field.
              PartDescription
              barThe bar.
              startThe start area.
              titleThe title area.
              endThe actions area.
              bottomThe row under the bar.

              App shell

              The frame of an app (Mantine's AppShell): header, navbar, main, aside and footer on wide screens; on phones one column with a bottom bar. The main content scrolls, the bars stay.

              One app, three widths
              phone layout: app bar, content, bottom nav

              The app is a page of its own (open it) in an iframe: its drawers, menus and sheets open inside the device, and the shell picks its layout from the frame's width.

              Code

              In a raylang app

              In a std/ui window opened as full_content (the page under a transparent title bar, macOS), with the native bridge, the header becomes the title bar: at least as tall, with room for the window buttons, and dragging it moves the window (buttons in it stay buttons). With layout="alt" or without a header, the navbar and the main content start below the title bar.

              var o = ui.options(1100, 720);
              o.kind = "full_content";
              let h = ui.open_with("Builds", "ray://app/index.html", o)?;

              The bridge also keeps the window's background and title bar in the theme's background, so switching to dark, resizing or reopening never flashes the other theme.

              <ray-app-shell> · RayAppShell

              The layout follows the shell's own width (a phone-sized frame shows the phone layout). Below breakpoint the navbar and the aside take no room (a ray-sidebar there still opens as its drawer) and the bottom slot shows. It fills the window's height (100dvh) unless sized. In a std/ui full_content window (ray-elements/core/raylang.js) the header becomes the title bar: room for the window buttons, and it drags the window; with layout="alt" or no header, the navbar and main start below it.

              PropertyAttributeTypeDefaultDescription
              layoutlayout reflectsdefault | altdefaultdefault: the header across the top; alt: the navbar full height, the header beside it.
              breakpointbreakpointstring48emWidth (px, em or rem) below which it takes the phone layout.
              paddingpadding reflectsstringPadding of the main area: xs…xl, a number (px) or a CSS length.
              EventDescription
              ray-breakpointIt switched between the wide and the phone layout.
              SlotDescription
              (default)The main content (it scrolls).
              headerTop bar: a ray-app-bar or a header of your own.
              navbarSide navigation (a ray-sidebar). Wide screens only.
              asideA panel on the other side (details, an inspector). Wide screens only.
              footerUnder the main content.
              bottomPhones only: a ray-bottom-nav.
              PartDescription
              shellThe grid.
              headerThe header area.
              navbarThe navbar area.
              mainThe scrolling main area.
              asideThe aside area.
              footerThe footer area.
              bottomThe bottom bar area.

              Aspect ratio

              A box with a fixed width/height ratio; its image, video or iframe fills it.

              16 / 9
              Code

              <ray-aspect-ratio> · RayAspectRatio

              PropertyAttributeTypeDefaultDescription
              ratioratio reflectsstring16/9Width/height: "16/9", "4:3", "1" or a number.
              fitfit reflectscover | containcoverHow the media fills the box (object-fit).
              radiusradius reflectsstringCorner radius: xs…xl, full or a CSS length.
              SlotDescription
              (default)The media (img, video, iframe or any element); it fills the box.

              Card

              A surface for grouped content, with optional media, header and footer.

              With media
              Guide8 min read
              Ship a native app with raylang

              From ray new to a signed bundle: the webview, the update feed and the release checklist.

              Ada LovelaceOct 2, 2026
              TemplateUpdated today
              Dashboard starter

              Sidebar, tables, charts and a settings modal, wired to a web backend.

              $0 · MITUse template
              Releasev1.27
              Per-page modules and faster docs

              Every docs page now loads only the components it shows, and the menu keeps its place.

              Profile and metrics
              Grace Hopper Compiler engineer · Arlington
              raylangcompilersCOBOL
              Commits
              1,284
              Reviews
              312
              Streak
              41 d
              FollowMessage
              Monthly active users48,210+12.4% vs September
              Storage62.4 / 100 GB
              Renews Nov 1Upgrade
              As a link
              A form, with the header and footer styled through ::part()
              Invite peopleThey get an email with a link that expires in 7 days.
              3 of 10 seats usedCancelSend invite
              Variants, shadows, radius and padding
              defaultcard surface, with-border filledmuted surface outlineborder, no fill shadow xsbarely lifted shadow mda raised panel shadow xlfloating radius xs · padding xsdense radius md · padding mdthe defaults radius xl · padding xlroomy
              Code

              <ray-card> · RayCard

              PropertyAttributeTypeDefaultDescription
              paddingpadding reflects0 | xs | sm | md | lg | xlmdInner spacing (named space scale).
              radiusradiusxs | sm | md | lg | xlCorner radius. Default: --ray-radius-default.
              shadowshadowxs | sm | md | lg | xlElevation.
              withBorderwith-borderbooleanDraws a border.
              variantvariant reflectsdefault | filled | outlinedefaultdefault: card surface; filled: muted surface; outline: border without fill.
              SlotDescription
              (default)The body.
              mediaFull-bleed image or media at the top.
              headerHeader content.
              footerFooter content (actions).
              PartDescription
              cardThe surface.
              headerThe header area.
              bodyThe body area.
              footerThe footer area.

              Center

              Its content centered on both axes (Mantine's Center): empty states, loaders, a sign-in card.

              Empty state, loading and sign-in
              No files yet Drop files here to upload them. Loading builds… Sign in Continue
              inline: beside text

              Builds run on ray runners and report to your notifications.

              Code

              <ray-center> · RayCenter

              It fills its parent's width; give it a height (or a flex or grid parent that stretches it) to center vertically.

              PropertyAttributeTypeDefaultDescription
              inlineinline reflectsbooleanAs wide as its content (inline-flex): an icon beside text.
              SlotDescription
              (default)The content.

              Container

              Its content centered, up to a maximum width, with side padding (Mantine's Container): the column of a page.

              The column of a page
              ray·blogPostsAbout
              October 8, 2026 Shipping per-page modules

              Every docs page now loads only the components it shows. The column stays readable at any window width: ray-container size="sm" caps it at 720px and pads it on phones.

              Sizes
              xs · 540px sm · 720px md · 960px (default) lg · 1140px size="30rem" padding="xl" fluid: the whole width, still padded
              Code

              <ray-container> · RayContainer

              PropertyAttributeTypeDefaultDescription
              sizesize reflectsstringmdMaximum width: xs 540px, sm 720px, md 960px, lg 1140px, xl 1320px, or any CSS length.
              paddingpadding reflectsstringmdSide padding: xs…xl, a number (px) or a CSS length.
              fluidfluid reflectsbooleanNo maximum width: the whole width, still padded.
              SlotDescription
              (default)The content.

              Grid

              A 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. Children span columns with data-span.

              Responsive to its own width: drag the corner
              data-span="full": a row of its own

              cols="1 xs:2 md:4": one column, two from 36em, four from 62em, measured on the grid (container queries), not the window.

              Spans
              data-span="2"11 1data-span="3" data-span="full"
              As many as fit: min-col-width
              blue
              teal
              violet
              pink
              orange
              green
              yellow
              red
              gap, row-gap and align
              gap="xl"align="center"row-gap="xs" 456
              Code

              <ray-grid> · RayGrid

              The widths are the grid's own (container queries: xs 36em, sm 48em, md 62em, lg 75em, xl 88em), so a grid in a narrow column or a phone frame drops to fewer columns. It needs a width from its parent: in a flex row give it one or let it grow. A child spans with data-span="2"…"12" or "full".

              PropertyAttributeTypeDefaultDescription
              colscols reflectsstring1Columns: a count, then counts from a width up ("1 sm:2 lg:4").
              minColWidthmin-col-widthstringInstead of cols: as many columns of at least this width as fit ("14rem", 220).
              gapgap reflectsstringmdSpace between cells: xs…xl, a number (px) or a CSS length.
              rowGaprow-gapstringSpace between rows when it differs from gap.
              alignalign reflectsstretch | start | center | endstretchVertical alignment of the cells in a row.
              SlotDescription
              (default)The cells (data-span="2" or "full" to span).
              PartDescription
              gridThe grid element.

              Group

              Its children in a row (Mantine's Group): spaced by the space scale, centered, wrapping when they do not fit. Toolbars, form actions, chips.

              A page header: title on one side, actions on the other
              ray-remoteDesktop app · 12 members Settings New build
              Wrapping chips, growing buttons, one line
              raylang web components design tokens accessibility React Vue dark mode Cancel Save changes nowrap keeps the row on one line; this text truncates instead of wrapping under the avatar.
              justify and align
              start center end align="end"
              Code

              <ray-group> · RayGroup

              A flex row on the host: the children are laid out directly, no wrapper.

              PropertyAttributeTypeDefaultDescription
              gapgap reflectsstringmdSpace between children: xs…xl (the space scale), a number (px) or any CSS length.
              alignalign reflectscenter | start | end | stretch | baselinecenterCross-axis alignment.
              justifyjustify reflectsstart | center | end | space-between | space-around | space-evenlystartMain-axis distribution: space-between for a title on one side and actions on the other.
              nowrapnowrap reflectsbooleanKeeps the children on one line.
              growgrow reflectsbooleanThe children share the width equally.
              SlotDescription
              (default)The children.

              Scroll area

              A box that scrolls its content with the native scrolling and a thin themed scrollbar (Mantine's ScrollArea). Edge shadows tell there is more; ray-reach-end fires at the end (load the next page).

              An endless list: ray-reach-end loads the next page
              Notifications12 loaded
                The shadows show which way there is more. Scroll to the end: ray-reach-end fires once, the next 12 load, and it fires again at the new end. scrollToStart() scrollToEnd()
                Horizontal, scrollbar on hover
                DashboardSidebar, tables, charts
                ChatThreads and presence
                StoreCatalog, cart, checkout
                BlogPosts, tags, RSS
                DocsSearch and a sidebar
                Mobile appApp shell and bottom nav
                Status pageUptime and incidents
                max-height: grows, then scrolls
                • release-notes.md12 KB
                • screenshot-dark.png1.8 MB
                Add a fileClear
                Code

                <ray-scroll-area> · RayScrollArea

                Give it a size: height, max-height, CSS, or a flex/grid parent. The scrolling box is focusable (keyboard scrolling); name it with label when it holds a region of its own.

                PropertyAttributeTypeDefaultDescription
                heightheightstringHeight (CSS length).
                maxHeightmax-heightstringMaximum height: it grows with its content up to this, then scrolls.
                orientationorientation reflectsvertical | horizontal | bothverticalWhich ways it scrolls.
                typetype reflectsauto | hover | neverautoThe scrollbar: auto (when it scrolls), hover (while hovered or scrolling), never (still scrolls).
                noShadowsno-shadows reflectsbooleanNo edge shadows.
                thresholdthresholdnumber48Distance from the end (px) at which ray-reach-end fires.
                labellabelstringAccessible name: makes the scrolling box a named region.
                EventDescription
                ray-reach-endThe end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left).
                SlotDescription
                (default)The content.
                PartDescription
                viewportThe scrolling box.
                shadowThe edge shadows.

                Separator

                A horizontal or vertical rule, optionally labeled (Mantine's Divider).

                Files Edit View
                Code

                <ray-separator> · RaySeparator

                PropertyAttributeTypeDefaultDescription
                orientationorientation reflectshorizontal | verticalhorizontalDirection of the rule.
                labellabel reflectsstringText in the middle of a horizontal rule.
                labelPositionlabel-position reflectsstart | center | end | left | rightcenterWhere the label sits: start/end follow the writing direction; left/right are sides of the screen.
                sizesize reflectsxs | sm | md | lg | xlxsThickness (1–5px).
                variantvariant reflectssolid | dashed | dottedsolidLine style.
                PartDescription
                lineThe rule without label.
                labelThe labeled rule.

                Split

                Two 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.

                An editor: a sidebar, and a terminal docked under the code (nested splits)
                ray-remote — main.ray
                main.rayserver.ray
                1import net/http;
                2
                3fn main() -> int {
                4    print("hello from raylang");
                5    0
                6}

                Terminal

                $ ray run
                hello from raylang
                ✓ exited with 0 in 41 ms
                main Ln 4, Col 5 Drag a divider, or focus it and use the arrows raylang
                Mail: three panes, each divider with its own limits
                • Ana TorresRelease notes for 0.22The knob is in, with a log scale for the EQ…
                • CIrelease.yml passedcheck ✓ · npm ✓ · three packages published
                • Luis PérezMixer layoutCould the meter scale go next to the fader?
                • ray-indexelements@0.22.0Index updated from the maintainer's machine.

                Release notes for 0.22

                Ana Torres · today, 9:41

                The knob is in, with a log scale for the EQ frequency and a bipolar arc for pan. Drag the dividers: the folders stop between 130 and 240 px, the list between 200 and 420.

                A docked inspector: fixed="end" keeps its width while the canvas stretches
                poster.design
                Collapsed until needed: the results open when the query runs
                medications.sql Run
                1select name, dose, next_at
                2  from alarms
                3 where active = 1
                4 order by next_at;

                Results

                namedosenext_at
                Ibuprofen400 mg14:00
                Vitamin D1000 IU20:00
                Omeprazole20 mg08:00
                Code

                <ray-split> · RaySplit

                Divider keys: arrows move it (Shift: faster), Home/End go to min/max, Enter or double click collapse the sized pane. position, min, max and collapsed are the sized pane's: the start pane, or the end pane with fixed="end".

                PropertyAttributeTypeDefaultDescription
                orientationorientation reflectshorizontal | verticalhorizontalhorizontal: side by side; vertical: stacked.
                fixedfixed reflectsstart | endstartThe pane that has the size and collapses; the other takes the rest. end: a panel docked on the end side (an inspector) that keeps its width while the start pane stretches.
                positionpositionstring50%Initial size of the sized pane: px (280) or any CSS length (30%, 20rem).
                minminnumber0Minimum size of the sized pane in px.
                maxmaxnumberMaximum size of the sized pane in px.
                collapsedcollapsed reflectsbooleanThe sized pane is hidden.
                disableddisabled reflectsbooleanThe divider cannot be moved.
                autosaveautosavestringA key: the size and the collapsed state are saved in localStorage and restored (a saved state wins over the collapsed attribute).
                EventDescription
                ray-resizeAfter a drag, a key or a collapse.
                SlotDescription
                startThe first pane: sized (a sidebar), or the one that takes the rest with fixed="end".
                endThe second pane: the one that takes the rest, or sized with fixed="end" (an inspector).
                PartDescription
                dividerThe separator.
                startThe start pane.
                endThe end pane.

                Texts

                What it writes itself, in English; setStrings() translates them (Getting started: Languages).

                KeyEnglish
                split.resizeResize

                Stack

                Its children in a column, spaced by the space scale (Mantine's Stack): forms, panels, anything stacked.

                A form, stacked
                Create a workspace Everyone you invite joins it. Create
                gap: the space scale
                xs
                sm
                md
                lg
                xl
                2 (px)
                align and justify
                align="start"
                align="center"
                align="end"
                justify="space-between"
                justify="center"
                Code

                <ray-stack> · RayStack

                A flex column on the host: the children are laid out directly, no wrapper.

                PropertyAttributeTypeDefaultDescription
                gapgap reflectsstringmdSpace between children: xs…xl (the space scale), a number (px) or any CSS length.
                alignalign reflectsstretch | start | center | end | baselinestretchCross-axis alignment: stretch fills the width.
                justifyjustify reflectsstart | center | end | space-between | space-around | space-evenlystartMain-axis distribution (with a height to distribute).
                SlotDescription
                (default)The children.

                Status bar

                The bar at the bottom of an app window: items on the left and on the right; items with action are buttons.

                ⎇ main ✕ 2 ⚠ 1 Ln 12, Col 5 Spaces: 4 raylang Debugging: server.ray VM · fibers on
                Code

                <ray-statusbar>

                PropertyAttributeTypeDefaultDescription
                variantvariant reflectsdefault | accentdefaultaccent: the primary color (e.g. while debugging).
                SlotDescription
                (default)Items on the left.
                rightItems on the right.

                <ray-statusbar-item>

                PropertyAttributeTypeDefaultDescription
                actionaction reflectsbooleanA button (listen to click).
                colorcolor reflectsstringText color (red for errors…).
                labellabelstringAccessible name and tooltip (for icon-only or terse items).
                SlotDescription
                (default)Text.
                iconIcon.

                Texts

                What it writes itself, in English; setStrings() translates them (Getting started: Languages).

                KeyEnglish
                statusbar.labelStatus bar

                Theme toggle

                Icon button that cycles the document theme: system, light, dark.

                Code

                <ray-theme-toggle> · RayThemeToggle

                PropertyAttributeTypeDefaultDescription
                sizesize reflectsxs | sm | md | lg | xlsmControl height.
                EventDescription
                ray-theme-changeFired on the document root by setTheme(); detail: { theme, resolved, primary }.
                PartDescription
                buttonThe inner button.

                Texts

                What it writes itself, in English; setStrings() translates them (Getting started: Languages).

                KeyEnglish
                theme-toggle.systemSystem theme
                theme-toggle.lightLight theme
                theme-toggle.darkDark theme
                theme-toggle.switch{theme} (switch to {next})
                theme-toggle.to-systemsystem
                theme-toggle.to-lightlight
                theme-toggle.to-darkdark