Visual style. raised: a physical key on a darker edge that sinks when pressed (mouse, touch or keyboard).
gradient
gradientreflects
string
With variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
color
color
string
A palette color (blue, red…) or any CSS color. Default: the primary color.
size
sizereflects
string
sm
Height, padding and font size: xs…xl or any CSS length (the padding and the font follow).
radius
radius
xs | sm | md | lg | xl | full
Corner radius. Default: --ray-radius-default.
type
type
button | submit | reset
button
submit/reset act on the enclosing form.
disabled
disabled
boolean
Not interactive (also when inside a disabled fieldset).
loading
loading
boolean
Shows a spinner over the content and blocks clicks.
fullWidth
full-width
boolean
Takes the whole width of its container.
wrap
wrapreflects
boolean
A 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.
href
href
string
Renders a link instead of a button.
target
target
string
Link target, with href.
name
name
string
With type=submit: submitted as name=value.
value
value
string
With type=submit: the submitted value.
Slot
Description
(default)
The label.
left
Icon or content before the label.
right
Icon or content after the label.
Part
Description
button
The inner <button> or <a>.
label
The 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).
LeftCenterRightDeployDeploy to stagingSchedule…100%
With variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
color
color
string
A palette color or any CSS color.
size
sizereflects
string
sm
Width and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it.
disabled
disabled
boolean
Not interactive.
loading
loading
boolean
Shows a spinner instead of the icon.
Slot
Description
(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).
Part
Description
button
The 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.
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.
Property
Attribute
Type
Default
Description
pressed
pressedreflects
boolean
On.
variant
variantreflects
subtle | outline | light | filled | raised
subtle
Look 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.
square
squarereflects
boolean
Square, for an icon alone (give it a label).
label
labelreflects
string
Accessible name and tooltip, for icon-only toggles.
Event
Description
change
The user flipped it (read `pressed`).
Slot
Description
(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
DayWeekMonth
The second one is required: the selected toggle cannot be turned off.
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.
Property
Attribute
Type
Default
Description
type
typereflects
single | multiple
single
single: choosing one turns the others off; multiple: each toggle is independent.
value
value
string
The selected key (single) or keys (multiple: an array, or a comma-separated attribute).
name
namereflects
string
Form field name: the value (multiple: one entry per key).
required
requiredreflects
boolean
Needs a value; with single the selected toggle cannot be turned off.
disabled
disabledreflects
boolean
Disables every toggle.
spaced
spacedreflects
boolean
Toggles apart, each with its own corners (default: joined).
variant
variantreflects
subtle | outline | light | filled | raised
Variant of the toggles.
color
colorreflects
string
Color of the toggles' on state.
size
sizereflects
xs | sm | md | lg | xl
Size of the toggles.
radius
radiusreflects
string
Corner radius of the toggles.
square
squarereflects
boolean
Square toggles, for icons.
Event
Description
change
The user changed the selection (read `value` or `values`; the toggles' own change events stop at the group).
Slot
Description
(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 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-* .
Property
Attribute
Type
Default
Description
name
namereflects
string
Form field name. The value is submitted as a string (data URL) or, with output="blob", as a file named <name>.jpg (.png, .webp).
value
value
string
The 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.
output
outputreflects
dataurl | blob
dataurl
What Use photo makes the value: a data URL (easy to keep in JSON) or a Blob (to upload).
label
label
string
Label above the avatar and the buttons.
description
description
string
Help text under the label.
error
error
string
Error message; marks the field invalid.
required
requiredreflects
boolean
A picture is required to submit the form.
disabled
disabledreflects
boolean
No choosing, removing nor preview (also inside a disabled <fieldset>).
readonly
readonlyreflects
boolean
The picture cannot be changed: the buttons are hidden, the preview still works. Not validated (required does not apply), as a native readonly field.
displayName
display-name
string
The person's name: the avatar shows its initials without a picture (name is the form field).
accept
accept
string
image/*
File types the picker offers.
size
sizereflects
xs | sm | md | lg | xl
xl
Size of the avatar.
color
color
string
Color of the avatar's initials (a palette color or any CSS color).
variant
variant
light | filled | outline | default
light
Style of the avatar's initials.
radius
radius
xs | sm | md | lg | xl | full
Corner radius of the avatar. Default: full (the crop frames a circle either way; the picture is square).
buttonSize
button-size
xs | sm | md | lg | xl
sm
Size of the buttons.
layout
layoutreflects
stack | inline
stack
The buttons one under the other, beside the avatar, or in a row.
sheet
sheetreflects
auto | drawer | dialog
auto
Where the crop opens: auto is a bottom drawer on a narrow screen (up to 40em) and a dialog otherwise.
outputSize
output-size
string
320
Side of the square picture kept, in pixels.
type
type
string
image/jpeg
Format of the picture kept (PNG where the browser cannot encode it).
quality
quality
number
0.85
0…1, for image/jpeg and image/webp.
maxZoom
max-zoom
number
4
The most zoom of the crop.
pickLabel
pick-label
string
Choose photo(text avatar-picker.pick)
The button without a picture.
changeLabel
change-label
string
Change photo(text avatar-picker.change)
The same button with a picture.
removeLabel
remove-label
string
Remove photo(text avatar-picker.remove)
The button that removes the picture.
sheetLabel
sheet-label
string
Adjust the photo(text avatar-picker.sheet)
Title of the crop sheet.
useLabel
use-label
string
Use photo(text avatar-picker.use)
The sheet's button that keeps the framed picture.
cancelLabel
cancel-label
string
Cancel(text avatar-picker.cancel)
The sheet's button that leaves the value as it was.
cropLabel
crop-label
string
Photo framing(text avatar-picker.crop)
Accessible name of the crop area.
zoomLabel
zoom-label
string
Zoom(text avatar-picker.zoom)
Name of the zoom slider.
preview
previewreflects
boolean
With 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.
previewLabel
preview-label
string
View photo(text avatar-picker.preview)
Accessible name of the avatar button and title of the preview dialog.
requiredLabel
required-label
string
Please choose a photo.(text avatar-picker.required)
Validation message of required without a picture.
failedLabel
failed-label
string
That 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).
Event
Description
input
The value changed (fired with change).
change
A picture was kept (Use photo) or removed. Read value.
ray-preview
The 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-error
The chosen file could not be decoded, or the framed picture encoded; the value is unchanged.
Part
Description
label
The label.
description
The description.
row
The avatar and the buttons (role group, named by the label).
view
Around the avatar; a button with preview and a picture.
avatar
The ray-avatar.
actions
The buttons' column (or row).
pick
The Choose photo / Change photo ray-button.
remove
The Remove photo ray-button.
error
The error message.
sheet
The ray-drawer or ray-dialog of the crop.
crop
The ray-image-crop.
preview
The ray-dialog of the preview.
preview-image
The picture in the preview dialog.
cancel
The sheet's Cancel ray-button.
use
The sheet's Use photo ray-button.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
avatar-picker.pick
Choose photo
avatar-picker.change
Change photo
avatar-picker.remove
Remove photo
avatar-picker.sheet
Adjust the photo
avatar-picker.use
Use photo
avatar-picker.cancel
Cancel
avatar-picker.crop
Photo framing
avatar-picker.zoom
Zoom
avatar-picker.preview
View photo
avatar-picker.required
Please choose a photo.
avatar-picker.failed
That image could not be opened.
Checkbox
A checkbox with label, description and error. Submits value when checked.
Current state. The checked attribute is the initial state (restored on reset).
indeterminate
indeterminatereflects
boolean
Mixed state; cleared on the next user change.
value
valuereflects
string
on
Submitted value when checked.
name
name
string
Form field name.
label
label
string
Label text (or put the label in the content).
description
description
string
Help text.
error
error
string
Error text.
required
required
boolean
Must be checked to submit.
disabled
disabled
boolean
Not interactive nor submitted.
variant
variantreflects
filled | outline
filled
Checked look: filled box, or colored border and mark.
color
color
string
A palette color or any CSS color for the checked state.
size
sizereflects
xs | sm | md | lg | xl
sm
Box and font size.
labelPosition
label-positionreflects
end | start | right | left
end
Side of the label: start/end follow the writing direction; left/right are sides of the screen.
Event
Description
change
When the user toggles it.
Slot
Description
(default)
Label content.
Part
Description
input
The native checkbox (transparent, on top of the indicator).
indicator
The drawn box.
label
The 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.
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.
Property
Attribute
Type
Default
Description
value
value (initial)
array
The checked values. The value attribute: "a,b".
name
namereflects
string
Form field name.
label
label
string
Group label (also its accessible name).
description
description
string
Help text.
error
error
string
Error text.
required
requiredreflects
boolean
At least one must be checked.
disabled
disabledreflects
boolean
Disables every checkbox.
max
max
number
At most this many: the others are disabled once reached; the label shows the count.
orientation
orientationreflects
vertical | horizontal
vertical
Layout of the checkboxes.
size
sizereflects
xs | sm | md | lg | xl
Size of the checkboxes that set none.
color
colorreflects
string
Color of the checkboxes that set none.
descriptionPosition
description-positionreflects
above | below
above
The description before the checkboxes or after them.
Event
Description
change
The user checked or unchecked one (read value).
input
Same moment as change.
Slot
Description
(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.
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.
Property
Attribute
Type
Default
Description
value
value
string
The color, written in format. Any color is accepted and rewritten in format. The value attribute is the initial value (restored on form reset).
format
formatreflects
string
hex
How value is written: hex, hexa, rgb, rgba, hsl or hsla. Formats ending in a show the opacity slider.
swatches
swatches
string
Preset colors below the picker: an array, or a comma-separated list in the attribute (commas inside rgb()/hsl() are kept).
swatchesPerRow
swatches-per-row
number
7
Swatches in each row.
swatchesOnly
swatches-onlyreflects
boolean
Only the swatches: no area nor sliders.
size
sizereflects
xs | sm | md | lg | xl
md
Width of the picker and size of its thumbs.
fullWidth
full-widthreflects
boolean
Takes the width of its container.
name
namereflects
string
Form field name.
disabled
disabledreflects
boolean
Not interactive.
label
label
string
Accessible name of the whole picker.
Event
Description
input
The color moved (every step of a drag).
change
The color settled: pointer released, a key pressed or a swatch chosen (read value).
Part
Description
saturation
The saturation/brightness area.
hue
The hue slider.
alpha
The opacity slider.
preview
The current color.
swatches
The 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.
Property
Attribute
Type
Default
Description
value
value
string
The color, written in format. The value attribute is the initial value (restored on form reset).
format
formatreflects
string
hex
How value is written: hex, hexa, rgb, rgba, hsl or hsla.
swatches
swatches
string
Preset colors in the dropdown (an array, or a comma-separated list).
swatchesPerRow
swatches-per-row
number
7
Swatches in each row.
placeholder
placeholder
string
Shown while empty.
hideEyedropper
hide-eyedropperreflects
boolean
Hides the eyedropper button.
open
openreflects
boolean
The dropdown is shown.
name
namereflects
string
Form field name.
label
label
string
Label above the field.
description
description
string
Help text.
error
error
string
Error message; marks the field invalid.
required
requiredreflects
boolean
Must have a color.
disabled
disabledreflects
boolean
Not interactive.
size
sizereflects
xs | sm | md | lg | xl
sm
Field height and font size.
radius
radiusreflects
string
Corner radius: xs…xl or a CSS length.
variant
variantreflects
default | filled | unstyled
default
Visual style of the field.
descriptionPosition
description-positionreflects
above | below
above
Where the description goes.
Event
Description
input
The color changed (typing a valid color, or moving the picker).
change
The color settled (picker released, a swatch, the eyedropper, or the field left with a new color).
ray-open
The dropdown opened.
ray-close
The dropdown closed.
Part
Description
input
The text field.
preview
The swatch of the current color.
eyedropper
The eyedropper button.
dropdown
The dropdown with the picker.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
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.
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.
Property
Attribute
Type
Default
Description
value
value (initial)
string
The chosen value; an array with multiple. The value attribute: "a,b" with multiple.
data
—
array
Options instead of child <option>/<optgroup> elements.
multiple
multiplereflects
boolean
Several values, shown as chips.
placeholder
placeholder
string
Shown while empty.
creatable
creatable
boolean
What was typed can be added when no option matches it ("+ Create …"); fires ray-create.
clearable
clearable
boolean
A button that clears the value.
maxValues
max-values
number
With multiple: at most this many.
limit
limit
number
At most this many options shown (large lists: keep typing).
nothingFound
nothing-found
string
No matches(text combobox.nothing-found)
Shown when nothing matches.
open
openreflects
boolean
The dropdown is shown.
Event
Description
change
The value changed (read value).
input
Same moment as change.
ray-create
A new value was created from the typed text.
ray-open
The dropdown opened.
ray-close
The dropdown closed.
Slot
Description
(default)
<option> and <optgroup> elements.
Part
Description
input
The text field.
chips
The chips container.
chip
A chip.
clear
The clear button.
dropdown
The listbox.
option
An option.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
combobox.clear
Clear
combobox.remove
Remove {label}
combobox.create
+ Create “{query}”
combobox.more
{count} more: keep typing
combobox.nothing-found
No 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
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).
Property
Attribute
Type
Default
Description
value
value
string
The chosen date, ISO "YYYY-MM-DD" ("" for none). The value attribute is the initial value (restored on form reset).
min
min
string
Earliest selectable date (ISO). Earlier days are disabled; an earlier value is invalid (rangeUnderflow).
max
max
string
Latest selectable date (ISO).
placeholder
placeholder
string
Pick a date(text date-picker.placeholder)
Shown while no date is chosen.
format
format
short | medium | long | full
medium
How the date is displayed (Intl dateStyle).
locale
locale
string
Locale for names and formats. Default: the nearest lang attribute, else the browser's.
firstDay
first-day
number
First day of the week, 0 (Sunday) to 6. Default: the locale's.
clearable
clearablereflects
boolean
Shows a button that clears the date.
open
openreflects
boolean
The calendar dropdown is shown.
native
nativereflects
auto | always | never
auto
Which 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.
name
namereflects
string
Form field name.
label
label
string
Visible label (also the accessible name).
description
description
string
Help text.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text.
required
required
boolean
Required for form submission.
disabled
disabled
boolean
Not interactive nor submitted.
size
sizereflects
xs | sm | md | lg | xl
sm
Height and font size.
radius
radius
xs | sm | md | lg | xl | full
Corner radius.
variant
variantreflects
default | filled | unstyled
default
Box style.
Event
Description
input
When the date changes (picked or cleared).
change
When the date changes (picked or cleared).
ray-open
The calendar opened.
ray-close
The calendar closed.
Part
Description
trigger
The button showing the date.
clear
The clear button.
dropdown
The calendar panel (a popover in the top layer).
calendar
The <ray-calendar> in the dropdown (its day, day-selected, day-today, day-outside, day-disabled, caption, nav and grid parts are exported).
input
The hidden native <input type=date> that holds the value (the model).
wrapper
The 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.
Property
Attribute
Type
Default
Description
value
value
string
The selected date, ISO "YYYY-MM-DD".
min
min
string
Earliest selectable date (ISO).
max
max
string
Latest selectable date (ISO).
locale
locale
string
Locale for month and weekday names. Default: the nearest lang attribute, else the browser's.
firstDay
first-day
number
First day of the week, 0 (Sunday) to 6. Default: the locale's.
size
sizereflects
xs | sm | md | lg | xl
sm
Day cell size and font size.
fullWidth
full-widthreflects
boolean
Fills 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
—
function
Marks 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.
Event
Description
change
A day was selected (read `value`).
Part
Description
header
The row with the month and the navigation buttons.
caption
The month and year.
nav
The previous/next month buttons.
grid
The day grid (role=grid).
day
Each 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-selected
The selected day (also part day).
day-today
Today (also part day).
day-outside
A day of the month before or after (also part day).
day-disabled
A day out of min/max (also part day).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
date-picker.placeholder
Pick a date
date-picker.clear
Clear date
date-picker.dropdown
Choose a date
date-picker.previous-month
Previous month, {month}
date-picker.next-month
Next 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.
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.
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.
Property
Attribute
Type
Default
Description
name
namereflects
string
Form field name: every file is submitted under it.
label
label
string
Label above the zone.
description
description
string
Help text under the label.
error
error
string
Error text (replaces the explanation of refused files).
required
requiredreflects
boolean
The form needs at least one file.
disabled
disabledreflects
boolean
No picking, dropping or removing.
accept
acceptreflects
string
Accepted types, as in <input type=file>: ".pdf,.png", "image/*", "application/json".
multiple
multiplereflects
boolean
Several files (else one, replaced by the next).
maxSize
max-size
string
Largest file: bytes or a size like "10 MB", "512 KB".
maxFiles
max-files
number
With multiple: the most files kept.
hint
hint
string
Small text in the zone. Default: from accept, max-size and max-files ("PNG or PDF · up to 10 MB each · max. 5 files").
dropLabel
drop-label
string
Drag files here(text file-upload.drop)
Title of the zone, before "or browse".
browseLabel
browse-label
string
browse(text file-upload.browse)
The link-styled word (the button text in compact).
activeLabel
active-label
string
Drop to add files(text file-upload.active)
Title while files are dragged over it.
tapLabel
tap-label
string
Choose files(text file-upload.tap)
Title on touch screens (no hover), where dragging files is rare.
variant
variantreflects
default | compact
default
default: a tall centered zone; compact: one row with a Browse button.
list
listreflects
rows | cards | none
rows
How chosen files show: full-width rows, thumbnail cards, or not at all (render your own on change).
native
nativereflects
boolean
With 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.
color
colorreflects
string
Accent of hover, drag and the browse link (default: primary).
Event
Description
change
Files were added or removed (read `files`, and `lastChange` for which).
ray-reject
Some files were refused (type, size or count).
ray-error
The native dialog failed (with `native`).
Slot
Description
icon
Replaces the upload icon.
Part
Description
dropzone
The zone (a button).
icon
The icon tile.
hint
The small text in the zone.
files
The list of chosen files.
label
The label.
error
The error text.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
file-upload.drop
Drag files here
file-upload.browse
browse
file-upload.active
Drop to add files
file-upload.tap
Choose files
file-upload.images
Images
file-upload.videos
Videos
file-upload.audio
Audio
file-upload.text
Text files
file-upload.types
{list} or {last}
file-upload.too-large
{name} is larger than {size}.
file-upload.only-one
Only 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.full
No more files can be added
file-upload.room
{ one: "Only {count} more file", other: "Only {count} more files" }
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.
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).
Property
Attribute
Type
Default
Description
src
src
string
The 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.
aspect
aspectreflects
string
1
Width / height of the frame and of the output: "1", "16/9", "4:3", "1.5".
shape
shapereflects
rect | circle
rect
The 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.
zoom
zoom
number
1
1: the image covers the frame; 2: twice as close. Kept between min-zoom and max-zoom; the user changes it.
minZoom
min-zoom
number
1
The least zoom (1 or more: the image always covers the frame).
maxZoom
max-zoom
number
4
The most zoom. It also sets how many pixels the working copy keeps.
zoomControl
zoom-controlreflects
boolean
A zoom slider under the image (the wheel, pinch and + / - zoom in any case).
outputSize
output-size
string
512
Size of the exported image: a width ("320", the height from the aspect) or "640x360".
type
type
string
image/jpeg
Format of toBlob/toDataURL. A browser that cannot encode it gives PNG (Safari has no WebP encoder).
quality
quality
number
0.85
0…1, for image/jpeg and image/webp.
label
label
string
Crop image(text image-crop.label)
Accessible name of the image area.
zoomLabel
zoom-label
string
Zoom(text image-crop.zoom)
Name of the zoom slider, and the word of the announced zoom ("Zoom 150%").
disabled
disabledreflects
boolean
No moving nor zooming.
Event
Description
input
The framing moved (every step of a drag, pinch, wheel or the slider).
change
The framing settled: pointer released, a key pressed, the slider released or the wheel stopped (read crop, zoom).
ray-load
The image loaded (its original size).
ray-error
The image could not be loaded or decoded.
Part
Description
stage
The image area (focusable; role slider for the zoom).
image
The image (a canvas of the working copy).
frame
The frame; what lies outside it is dimmed.
zoom
The zoom ray-slider (with zoom-control).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
image-crop.label
Crop image
image-crop.zoom
Zoom
Input
A text field with label, description and error (Mantine's TextInput). Form-associated.
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.
Property
Attribute
Type
Default
Description
value
value
string
Current value. The value attribute is the initial value (restored on form reset).
type
typereflects
text | email | password | search | number | url | tel | time | date | datetime-local
text
Input 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".
name
namereflects
string
Form field name.
label
label
string
Visible label (also the accessible name).
description
description
string
Help text under the label.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text; marks the field invalid (display only — does not block submit).
placeholder
placeholder
string
Placeholder text.
required
required
boolean
Required for form submission; shows an asterisk.
disabled
disabled
boolean
Not editable nor submitted.
readonly
readonly
boolean
Not editable, still submitted.
size
sizereflects
xs | sm | md | lg | xl
sm
Height and font size.
radius
radius
xs | sm | md | lg | xl | full
Corner radius.
variant
variantreflects
default | filled | unstyled
default
Box style.
highlight
—
function
Marks 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
—
function
Inline 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).
suggestionsLabel
suggestions-label
string
Suggestions(text input.suggestions)
Accessible name of the suggestion list.
Attribute
Description
autocomplete
Forwarded to the inner input.
inputmode
Virtual keyboard hint.
pattern
Validation pattern (regular expression).
min
Minimum (number/date types).
max
Maximum (number/date types).
step
Step (number types).
minlength
Minimum length.
maxlength
Maximum length.
autocapitalize
Mobile auto-capitalization.
enterkeyhint
Label of the Enter key on virtual keyboards.
list
Id of a <datalist> with suggestions.
Event
Description
ray-complete
A suggestion was accepted (the text already has it).
ray-highlight-hover
The 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.
input
On every edit (value already updated).
change
When an edit is committed (blur, Enter).
Slot
Description
left
Section before the text (icon).
right
Section after the text (icon, button).
Part
Description
input
The inner <input>.
wrapper
The box around the input and sections.
label
The label.
description
The description.
error
The error message.
suggestions
The suggestion list (a listbox in the top layer).
suggestion
Each suggestion ([aria-selected] when active).
suggestion-label
A suggestion's label (in the mono font).
suggestion-detail
A suggestion's detail.
suggestion-description
A suggestion's description, under its label (in the interface font).
highlight
Each marked range (also highlight-<kind> for a range with a kind).
text-layer
The layer behind the text that holds the marks.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
input.suggestions
Suggestions
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.
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.
Property
Attribute
Type
Default
Description
value
value
number
Current value. The value attribute is the initial one (restored on reset).
min
min
number
0
Minimum.
max
max
number
100
Maximum.
step
step
number
1
Step; 0: continuous.
defaultValue
default-value
number
What a double click returns to. Default: the value attribute; without one, min (the middle when bipolar).
scale
scalereflects
linear | log
linear
log: equal turns for equal ratios (20 Hz to 20 kHz); needs min above 0. The arrow keys then move a hundredth of the sweep.
bipolar
bipolarreflects
boolean
The arc grows from 0 (from the middle when the range does not span 0): pan, a balance, a detune.
name
name
string
Form field name.
label
label
string
Visible label, above the dial (it names the slider).
description
description
string
Help text.
error
error
string
Error text.
disabled
disabled
boolean
Not interactive nor submitted.
color
colorreflects
string
The arc's color.
size
sizereflects
xs | sm | md | lg | xl
sm
The dial's size (28 to 72px; --ray-knob-size for any other).
showValue
show-valuereflects
boolean
Shows the value under the dial.
unit
unit
string
Appended to the value's text (" dB", " Hz", "%").
format
—
function
The value's text, shown and spoken: (v) => v >= 1000 ? `${v / 1000} kHz` : `${v} Hz`.
Event
Description
input
While it turns.
change
When it settles: the end of a drag, a key, a pause of the wheel, a double click.
Part
Description
dial
The dial (role=slider).
track
The ring's track.
arc
The arc of the value.
body
The knob's body.
pointer
The line that shows where it points.
value
The 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.
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.
Property
Attribute
Type
Default
Description
mode
modereflects
string
The chosen mode's value (default: the first). Setting it applies that mode without ray-mode-change.
options
—
array
The modes; when not set, the <option> children.
display
displayreflects
label | icon | both
What the trigger shows: the mode's hint or label, its icon, or both. Default: the icon when the mode has one, else the label.
position
positionreflects
start | end
start
The side of the field the trigger sits on.
menuLabel
menu-label
string
Mode(text mode-input.menu)
The trigger's accessible name, read with the current mode ("Mode: File").
nativeMenu
native-menureflects
boolean
With a native host (a std/ui window with the bridge), the system's menu (no descriptions there).
Event
Description
ray-mode-change
The user chose a mode (mode is already the new one); cancelable: preventDefault keeps the previous mode.
Part
Description
trigger
The button that opens the menu.
trigger-icon
The current mode's icon in the trigger.
trigger-label
The current mode's hint or label in the trigger.
menu
The ray-menu of modes.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
mode-input.menu
Mode
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.
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.
Property
Attribute
Type
Default
Description
value
value
number
The number (undefined when empty).
min
min
number
Minimum.
max
max
number
Maximum.
step
step
number
1
What + and − add.
decimals
decimals
number
Fixed decimals (2: 3 shows as 3.00).
prefix
prefix
string
Shown before the number ("$"), beside the editable text: the field holds the digits only. Still in aria-valuetext and in the min/max messages.
suffix
suffix
string
Shown after the number (" kg", "%"), hugging it on the other side of the caret: the field holds the digits only.
thousandsSeparator
thousands-separator
string
Groups thousands in the shown text (",", ".", " ").
decimalSeparator
decimal-separator
string
.
The decimal mark shown and typed ("," in many locales).
clamp
clamp
blur | strict | none
blur
When out-of-range input is clamped: on blur, while typing, or never (then it is invalid).
format
formatreflects
number | duration
number
duration: 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.
hideControls
hide-controlsreflects
boolean
No + and − buttons (the keys still step).
placeholder
placeholder
string
Shown while empty.
readonly
readonlyreflects
boolean
Not editable, still submitted.
Event
Description
input
On every change of the value (typing, keys, buttons).
change
When the value is committed (blur, a step).
Slot
Description
left
Left section (an icon).
right
Right section.
Part
Description
input
The text field.
prefix
The prefix beside the text field.
suffix
The suffix beside the text field.
controls
The + and − column.
increment
The + button.
decrement
The − button.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
number-input.increment
Increment
number-input.decrement
Decrement
number-input.required
Please enter a number.
number-input.min
The minimum is {min}.
number-input.max
The 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.
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.
Property
Attribute
Type
Default
Description
visible
visiblereflects
boolean
The password is shown as text.
showLabel
show-label
string
Show password(text password-input.show)
Accessible name of the toggle while hidden.
hideLabel
hide-label
string
Hide password(text password-input.hide)
Accessible name of the toggle while shown.
Event
Description
ray-visibility-change
The user showed or hid the password.
Part
Description
toggle
The show/hide button.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
password-input.show
Show password
password-input.hide
Hide 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.
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.
// 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.
Property
Attribute
Type
Default
Description
mode
modereflects
open | folder | save
open
What the dialog chooses: an existing file, a folder, or a file to save (the current name is suggested).
accept
acceptreflects
string
File types the dialog offers, as in <input type=file>: ".json,.toml", "image/*" (ignored for folders).
browseLabel
browse-label
string
Browse…(text path-input.browse)
Text of the button.
dialogTitle
dialog-title
string
Title of the system dialog (default: the label).
Event
Description
change
The path changed: typed and committed, or chosen in the dialog.
ray-error
The system dialog failed.
Part
Description
browse
The Browse… button.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
path-input.browse
Browse…
Radio group
One choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control.
Arrow keys move the selection, Tab enters and leaves the group.
Property
Attribute
Type
Default
Description
value
value
string
Value of the checked radio. Initial: the value attribute, or a radio with the checked attribute.
name
name
string
Form field name.
label
label
string
Group label (also its accessible name).
description
description
string
Help text.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text.
required
required
boolean
A choice is needed to submit.
disabled
disabled
boolean
Disables every radio.
orientation
orientationreflects
vertical | horizontal
vertical
Layout of the radios.
size
sizereflects
xs | sm | md | lg | xl
sm
Size of every radio.
color
color
string
Checked color of every radio.
variant
variantreflects
filled | outline
filled
Checked look of every radio: filled circle, or colored ring and dot.
Event
Description
input
When the user picks a radio.
change
When the user picks a radio.
Slot
Description
(default)
ray-radio or ray-radio-card elements (may be wrapped in layout elements: a ray-grid of cards).
<ray-radio>
Property
Attribute
Type
Default
Description
value
valuereflects
string
Value given to the group when chosen.
checked
checked (initial)
boolean
Whether 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).
label
label
string
Label text (or the content).
description
description
string
Help text under the label.
disabled
disabled
boolean
Cannot be chosen.
color
color
string
Overrides the group color.
size
size
xs | sm | md | lg | xl
Overrides the group size.
variant
variantreflects
filled | outline
Overrides the group variant.
Slot
Description
(default)
Label content.
Part
Description
indicator
The circle.
label
The 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.
Property
Attribute
Type
Default
Description
hideIndicator
hide-indicatorreflects
boolean
No radio circle: the card's border and background alone show the choice.
Slot
Description
(default)
More content under the description.
icon
An icon before the title.
Part
Description
root
The card.
icon
Around the icon slot.
Search
A search box: icon, clear button, an optional shortcut that focuses it, and a debounced ray-search event. A RayInput, so it has a label and takes part in forms.
Selected value (default: the first enabled option).
data
—
array
Options as strings or { value, label, disabled }.
name
name
string
Form field name.
color
colorreflects
string
Indicator color (default: a raised neutral segment).
size
sizereflects
xs | sm | md | lg | xl
sm
Height and font size.
radius
radius
xs | sm | md | lg | xl | full
Corner radius.
fullWidth
full-width
boolean
Takes the whole width.
orientation
orientationreflects
horizontal | vertical | auto
horizontal
Direction. 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.
disabled
disabled
boolean
Not interactive nor submitted.
Event
Description
input
The user picked another option.
change
The user picked another option.
Slot
Description
(default)
<option> elements.
Part
Description
root
The row.
indicator
The sliding highlight.
control
Each option button. In a narrow container the options shrink and their labels end in an ellipsis.
control-selected
The chosen option (also part control): ::part() takes no attribute selector.
label
The 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.
Options as strings or { value, label, disabled } (instead of child options).
placeholder
placeholder
string
Shown while nothing is selected (with required, blocks submit).
open
openreflects
boolean
The dropdown is shown.
native
nativereflects
auto | always | never
auto
Which 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.
name
name
string
Form field name.
label
label
string
Visible label.
description
description
string
Help text.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text.
required
required
boolean
Required for form submission.
disabled
disabled
boolean
Not interactive nor submitted.
size
sizereflects
xs | sm | md | lg | xl
sm
Height and font size.
variant
variantreflects
default | filled | unstyled
default
Box style.
Event
Description
input
When the selection changes.
change
When the selection changes.
ray-open
The dropdown opened.
ray-close
The dropdown closed.
Slot
Description
(default)
<option> and <optgroup> elements.
Part
Description
trigger
The combobox button showing the selected option.
dropdown
The listbox panel (a popover in the top layer).
option
Each option in the dropdown ([aria-selected], [data-active], [aria-disabled]).
select
The hidden native <select> that holds the value (the model).
wrapper
The box.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
select.empty
No 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
Vocals
Guitar
Bass
Drums
Your own thumb: the --ray-slider-thumb-* variables
Current value. The value attribute is the initial one (restored on reset).
min
min
number
0
Minimum.
max
max
number
100
Maximum.
step
step
number
1
Step.
name
name
string
Form field name.
label
label
string
Visible label.
description
description
string
Help text.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text.
disabled
disabled
boolean
Not interactive nor submitted.
color
colorreflects
string
Track and thumb color.
size
sizereflects
xs | sm | md | lg | xl
sm
Track and thumb size.
showValue
show-valuereflects
boolean
Shows the value next to the label.
unit
unit
string
Appended to the shown value and its spoken text (%, px, ms…).
marks
—
array
Labeled ticks under the track.
orientation
orientationreflects
horizontal | vertical
horizontal
vertical: 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).
thumb
thumbreflects
round | cap
round
The 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.
taper
taperreflects
linear | fader
linear
How 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.
defaultValue
default-value
number
What a double click returns to (a fader's 0 dB). Without it, the value attribute.
Event
Description
input
While dragging.
change
When released.
Part
Description
input
The native range input.
Switch
An on/off toggle with the same API as Checkbox, announced as a switch.
Same properties and events as ray-checkbox (indeterminate does not apply).
Property
Attribute
Type
Default
Description
checked
checked (initial)
boolean
Current state. The checked attribute is the initial state.
value
value
string
on
Submitted value when on.
name
name
string
Form field name.
label
label
string
Label text (or the content).
description
description
string
Help text.
error
error
string
Error text.
labelPosition
label-positionreflects
end | start | right | left
end
Side of the label: start/end follow the writing direction; left/right are sides of the screen.
color
color
string
Track color when on.
size
sizereflects
xs | sm | md | lg | xl
sm
Track size.
disabled
disabled
boolean
Not interactive nor submitted.
Event
Description
change
When the user toggles it.
Slot
Description
(default)
Label content.
Part
Description
track
The track.
thumb
The 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
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.
Property
Attribute
Type
Default
Description
value
value (initial)
array
The tags. The value attribute: "a,b". A string "a,b" assigned to the property is read as a list too.
data
—
array
Suggestions instead of child <option> elements.
placeholder
placeholder
string
Shown while there are no tags.
max
max
number
At most this many tags; when reached, nothing more is added and the suggestions hide.
suggestionsLimit
suggestions-limit
number
6
At most this many suggestions shown (keep typing for the rest); 0 shows them all.
suggestionsLabel
suggestions-label
string
Suggestions(text tags-input.suggestions)
The accessible name of the group of suggestions.
separators
separators
string
,
Characters that end a tag as they are typed or pasted (",;" for both); "" for none (Enter and leaving the field still add).
Event
Description
change
A tag was added or removed (read value).
input
Same moment as change.
Slot
Description
(default)
<option> elements: the suggestions (the text is the tag; value, if different, is what the tag stores).
Part
Description
input
The text field.
tags
The tags container.
tag
A tag.
tag-remove
A tag's remove button.
suggestions
The group of suggestions under the field.
suggestion
A suggestion button.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
tags-input.remove
Remove {label}
tags-input.suggestions
Suggestions
Textarea
A multi-line text field that can grow with its content. Form-associated.
A comment with a character count
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.
Also forwards placeholder, autocomplete, minlength, maxlength, spellcheck and wrap. Initial value: the value attribute or the element's text.
Property
Attribute
Type
Default
Description
value
value
string
Current value.
rows
rows
number
3
Visible rows (minimum when autosize).
autosize
autosize
boolean
Grows with the content.
maxRows
max-rows
number
With autosize: stop growing and scroll after this many rows.
name
name
string
Form field name.
label
label
string
Visible label.
description
description
string
Help text.
descriptionPosition
description-positionreflects
above | below
above
The description before the control (help first) or after it, with the error (fields in a row stay aligned).
error
error
string
Error text.
required
required
boolean
Required for form submission.
disabled
disabled
boolean
Not editable nor submitted.
readonly
readonly
boolean
Not editable, still submitted.
size
sizereflects
xs | sm | md | lg | xl
sm
Font size.
variant
variantreflects
default | filled | unstyled
default
Box style.
highlight
—
function
Marks 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
—
function
Inline 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).
suggestionsLabel
suggestions-label
string
Suggestions(text textarea.suggestions)
Accessible name of the suggestion list.
Attribute
Description
placeholder
Placeholder text.
autocomplete
Forwarded to the inner textarea.
minlength
Minimum length.
maxlength
Maximum length.
wrap
soft or hard.
Event
Description
ray-complete
A suggestion was accepted (the text already has it).
ray-highlight-hover
The 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.
input
On every edit.
change
When an edit is committed.
Part
Description
textarea
The inner <textarea>.
wrapper
The box.
suggestions
The suggestion list (a listbox in the top layer).
suggestion
Each suggestion ([aria-selected] when active).
suggestion-label
A suggestion's label (in the mono font).
suggestion-detail
A suggestion's detail.
suggestion-description
A suggestion's description, under its label (in the interface font).
highlight
Each marked range (also highlight-<kind> for a range with a kind).
text-layer
The layer behind the text that holds the marks.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
textarea.suggestions
Suggestions
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
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.
Property
Attribute
Type
Default
Description
value
valuereflects
string
The current destination (an item's value, else its href, else its label).
label
label
string
Main(text bottom-nav.label)
Accessible name of the navigation.
labels
labelsreflects
always | active | never
always
Which labels show (the others stay for assistive technology).
indicator
indicatorreflects
pill | line | none
pill
How the current destination is marked besides its color.
color
colorreflects
string
A palette color or any CSS color for the current item and the action (default: primary).
variant
variantreflects
default | floating
default
default: a bar across the bottom; floating: a rounded bar off the edges.
hideOnScroll
hide-on-scrollreflects
boolean
Slides away while the content scrolls down, back on the way up.
fixed
fixedreflects
boolean
Pinned to the bottom of the window (outside a shell).
scrollTarget
scroll-target
string
A selector of the element whose scrolling it follows (default: its shell's, else the window).
Event
Description
change
The user picked another destination (read value).
ray-select
An action item was pressed.
Slot
Description
(default)
ray-bottom-nav-item elements (3 to 5).
Part
Description
nav
The <nav>.
<ray-bottom-nav-item>
A link with href, else a button. The badge is read with the label ("Messages, 3").
Property
Attribute
Type
Default
Description
value
valuereflects
string
Its value (default: its href, else its label).
label
label
string
The label.
icon
icon
string
An 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).
href
hrefreflects
string
Makes it a link.
badge
badge
string
A count or a short text on the icon.
dot
dotreflects
boolean
A dot on the icon (something new).
active
activereflects
boolean
Set by the bar: the current destination.
disabled
disabledreflects
boolean
Not interactive.
action
actionreflects
boolean
A raised round button ("New"): it fires ray-select on the bar, it is not a destination.
Slot
Description
icon
A custom icon (a ray-icon, an svg, an avatar).
Part
Description
item
The link or button.
indicator
The pill behind the icon.
badge
The badge.
label
The label.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
bottom-nav.label
Main
bottom-nav.badge
{label}, {badge}
bottom-nav.dot
{label}, new
Breadcrumbs
Where a page sits (Mantine's Breadcrumbs, the WAI-ARIA breadcrumb pattern): links in a labelled nav, the last one the current page. Any separator or a chevron; a long path collapses into an expandable "…".
A page header
HomeProjectsray-remoteSettingsSettingsDiscardSave
A deep path, collapsed: max-items
DriveCompanyDesign2026Q4ray-elementsscreenshotsThe “…” is a button: it shows the whole path (and focus moves into it).
A <nav aria-label="Breadcrumb"> around a list. The last crumb is the current page (aria-current="page") unless one says current.
Property
Attribute
Type
Default
Description
separator
separator
string
/
Text between crumbs ("/", "›", "·") or "chevron" (an icon).
maxItems
max-items
number
Longer paths show the first crumb, "…" (a button that expands them) and the last max-items − 1.
label
label
string
Breadcrumb(text breadcrumbs.label)
Accessible name of the nav.
size
sizereflects
xs | sm | md | lg
sm
Font size.
Slot
Description
(default)
ray-breadcrumb elements.
Part
Description
nav
The <nav>.
list
The <ol>.
<ray-breadcrumb>
A link with href (text without, or when current).
Property
Attribute
Type
Default
Description
href
hrefreflects
string
Where it leads.
current
currentreflects
boolean
This crumb is the current page (default: the last).
Slot
Description
(default)
The text.
icon
An icon before the text.
Part
Description
link
The link (or the text of the current page).
separator
The separator before it.
more
The "…" button of a collapsed path.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
breadcrumbs.label
Breadcrumb
breadcrumbs.more
Show the whole path
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.
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.
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.
Property
Attribute
Type
Default
Description
value
value
string
Value of the selected tab (default: the first).
panel
panel
string
The id of the shared panel: it gets role=tabpanel and aria-labelledby the selected tab; the tabs get aria-controls.
label
label
string
Accessible name of the tab list ("Open requests").
closeLabel
close-label
string
Close(text doc-tabs.close)
Tooltip of the ×.
dirtyLabel
dirty-label
string
Unsaved changes(text doc-tabs.dirty)
What assistive technology hears after the name of a dirty tab.
Event
Description
change
The selected tab changed: a click, the arrow keys, or the selected tab removed.
ray-request-close
The × was clicked, the tab middle-clicked, or Delete/Backspace pressed on it: remove the tab to close it (not fired for hide-close tabs).
Slot
Description
(default)
ray-doc-tab elements.
end
After the tabs, outside the scrolling list: a new-tab button.
Part
Description
list
The tab list (it scrolls sideways when the tabs do not fit).
end
The 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.
Property
Attribute
Type
Default
Description
value
valuereflects
string
Identifies the document (ray-doc-tabs value).
dirty
dirtyreflects
boolean
Unsaved changes: a dot in place of the ×, which comes back under the pointer.
hideClose
hide-closereflects
boolean
Cannot be closed: no ×, no middle click, no Delete.
Slot
Description
(default)
The document's name.
left
An icon or a tag (a file type, an HTTP method).
Part
Description
label
The name.
left-section
The left slot's box.
close
The × (pointer only: it is not focusable).
dot
The unsaved mark.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
doc-tabs.close
Close
doc-tabs.dirty
Unsaved changes
Nav link
A sidebar/navigation item: icon, label, description, badge, active state, and nested nav links that collapse under it.
Color of the current page: a palette color or any CSS color. Default: the primary color.
size
sizereflects
xs | sm | md | lg | xl
sm
Item size.
radius
radius
xs | sm | md | lg | xl | full
Corner radius of the items.
disabled
disabledreflects
boolean
Not interactive.
label
label
string
Pagination(text pagination.label)
Accessible name of the navigation landmark.
Event
Description
change
The user went to another page (read `value`).
Part
Description
root
The <nav> landmark.
list
The list of items.
item
Every button (pages and controls).
active
The current page button.
control
Previous/next/first/last buttons.
dots
An ellipsis.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
pagination.label
Pagination
pagination.previous
Previous page
pagination.next
Next page
pagination.page
Page {page}
Sidebar
The side navigation of an app shell: header, content and footer; on wide screens it collapses to an icon rail (or out of view), below a breakpoint it becomes an off-canvas drawer. toggle() does the right thing for the screen. It is for navigation, a list of places with icons; for content such as a tree of documents, a panel that hides and resizes, put your own element in a pane of a ray-split (the start pane, or the end pane with fixed="end" for an inspector; min, max, autosave, collapsed).
ray-remote
3
Files
The button collapses the sidebar to icons, or out of view with collapse="offcanvas"; its edge drags it wider (resizable); on a narrow screen it opens it as a drawer.
Put ray-sidebar-group + ray-nav-link (with an icon in slot=left) inside. Collapsed, nav links show only their icon (the label becomes the tooltip) and the host has the collapsed attribute, so your own header/footer content can hide with CSS (ray-sidebar[collapsed] .brand-name { display: none }).
Property
Attribute
Type
Default
Description
collapsed
collapsedreflects
boolean
Wide screens: collapsed as collapse says (an icon rail, or out of view).
collapse
collapsereflects
icon | offcanvas
icon
What collapsed does on wide screens: icon, a rail of the nav links' icons; offcanvas, hidden entirely (no width, out of the tab order).
open
openreflects
boolean
Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it).
side
sidereflects
start | end | left | right
start
The edge it sits on (its border faces the content, its narrow-screen drawer slides from there): start/end follow the writing direction; left/right are sides of the screen.
variant
variantreflects
sidebar | floating
sidebar
A panel against the edge, or a floating card with a margin.
width
width
string
Width when expanded (CSS length). Default 16rem.
collapsedWidth
collapsed-width
string
Width of the icon rail. Default 3.5rem.
breakpoint
breakpoint
string
48em
At this viewport width and below, it becomes a drawer.
label
label
string
Sidebar(text sidebar.label)
Accessible name of its navigation.
resizable
resizablereflects
boolean
Wide screens, expanded: its inner edge drags (or, focused, arrow-keys; Shift is faster, Home/End go to the limits) the width between min-width and max-width.
minWidth
min-width
number
192
Narrowest width when resizing, in px.
maxWidth
max-width
number
480
Widest width when resizing, in px.
autosave
autosave
string
A key: the resized width is saved in localStorage and restored. A later change of width wins.
resizeLabel
resize-label
string
Resize sidebar(text sidebar.resize)
Accessible name of the resize edge.
Event
Description
ray-resize
After a drag or a key resized it (resizable).
ray-toggle
After toggle().
ray-open
The drawer opened (narrow screens).
ray-close
The drawer closed (narrow screens).
Slot
Description
(default)
The navigation: ray-sidebar-group and ray-nav-link elements.
header
Top area (brand, workspace switcher).
footer
Bottom area (user, settings).
Part
Description
panel
The panel (in the drawer on narrow screens).
header
The header area.
content
The scrolling <nav>.
footer
The footer area.
resizer
The resize edge (a separator), shown when resizable.
drawer
The <dialog> used on narrow screens.
<ray-sidebar-group>
A titled section of nav links; the title fades out (keeping its height) when the sidebar collapses.
Property
Attribute
Type
Default
Description
label
label
string
Section title.
Slot
Description
(default)
ray-nav-link elements.
Part
Description
label
The title.
items
The links container.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
sidebar.label
Sidebar
sidebar.resize
Resize sidebar
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 overBackNext
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.
Property
Attribute
Type
Default
Description
active
activereflects
number
0
Index of the active step (steps.length: completed).
orientation
orientationreflects
horizontal | vertical
horizontal
Steps in a row above the content, or in a column beside it.
iconPosition
icon-positionreflects
start | top | left
start
Label beside the number (after it in the reading direction), or under it (narrow screens, many steps). "left", its former name, still works.
allowStepSelect
allow-step-selectreflects
boolean
Completed steps are buttons that go back to them.
linear
linear
boolean
true
With allow-step-select off, false lets the user jump to any step.
size
sizereflects
sm | md | lg
md
Size of the numbers.
color
colorreflects
string
A palette color or any CSS color for active and completed steps (default: primary).
label
label
string
Progress(text stepper.label)
Accessible name of the list of steps.
Event
Description
change
active changed by the user (a step clicked, next(), prev()).
Slot
Description
(default)
ray-step elements.
completed
Shown once every step is done.
Part
Description
steps
The list of steps.
step
A step (also step-done, step-active, step-todo).
indicator
A step's number or icon.
label
A step's label.
description
A step's description.
connector
The line between steps.
content
The content area.
<ray-step>
A step: its header is drawn by the stepper, its content shows while it is active.
Property
Attribute
Type
Default
Description
label
label
string
The label.
description
description
string
A line under the label.
icon
icon
string
An icon instead of the number.
completedIcon
completed-icon
string
The icon once done (default: check).
loading
loadingreflects
boolean
A spinner instead of the number.
error
error
string
An error message: red step, the message as its description.
disabled
disabledreflects
boolean
Cannot be selected.
Slot
Description
(default)
The content shown while it is active.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
stepper.label
Progress
stepper.step
Step {index}
stepper.position
Step {index} of {count}:
Tabs
Tabs and panels (WAI-ARIA tabs pattern): arrows, Home/End, automatic or manual activation.
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.
Property
Attribute
Type
Default
Description
value
value
string
Value of the active tab (default: the first enabled one).
variant
variantreflects
default | outline | pills
default
Tab style.
orientation
orientationreflects
horizontal | vertical
horizontal
Tab list direction (and arrow keys).
color
colorreflects
string
Active indicator color.
size
sizereflects
xs | sm | md | lg | xl
sm
Height, font size and padding of the tabs (xs for a compact bar).
activation
activation
auto | manual
auto
manual: arrows move focus, Enter/Space activates.
grow
growreflects
boolean
Tabs share the full width.
Event
Description
change
The user activated another tab.
Slot
Description
(default)
ray-tab and ray-tab-panel elements (tabs move to the tab list on their own).
Part
Description
list
The tab list (it scrolls sideways when the tabs do not fit).
panels
The panel area.
<ray-tab>
Property
Attribute
Type
Default
Description
value
valuereflects
string
Matches a ray-tab-panel's value.
disabled
disabledreflects
boolean
Cannot be activated.
count
countreflects
string
A small number after the label ("3", "99+"), lighter than a badge; part of the tab's accessible name. Empty: none.
Slot
Description
left
Icon.
right
A badge or other content after the label (for a plain number, count is lighter).
Part
Description
count
The count.
<ray-tab-panel>
Property
Attribute
Type
Default
Description
value
valuereflects
string
Matches 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.
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()?;
}
}
Toggle shortcut (mod = ⌘ on macOS, Ctrl elsewhere); empty to disable.
limit
limit
number
50
Maximum results.
emptyLabel
empty-label
string
Nothing found(text command-palette.empty)
Text without results.
label
label
string
Command palette(text command-palette.label)
Accessible name.
hideHint
hide-hintreflects
boolean
No keyboard hint at the bottom.
navigateLabel
navigate-label
string
navigate(text command-palette.navigate)
The keyboard hint's word for ↑↓.
runLabel
run-label
string
run(text command-palette.run)
The keyboard hint's word for ↵.
closeLabel
close-label
string
close(text command-palette.close)
The keyboard hint's word for esc.
nativeMenus
native-menusreflects
boolean
With 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.
overlayBlur
overlay-blur
string
Blur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml).
Event
Description
ray-select
An action was run.
ray-open
After it opened.
ray-close
After it closed.
Part
Description
dialog
The dialog.
input
The search field.
option
Each result.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
command-palette.label
Command palette
command-palette.placeholder
Search commands…
command-palette.empty
Nothing found
command-palette.navigate
navigate
command-palette.run
run
command-palette.close
close
command-palette.shortcut
Shortcut {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-elementsBackdrop, 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
LiveGeneralMembersBuildNotificationsDanger zone
Visibility
Invite
Every buildFailures onlyNothing
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 agoCancelSave 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
CancelRename
raylang 1.27
Frontend
CancelCreate
Your changes will be lost if you close without saving.
Don't saveCancelSave
CancelSave 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
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.
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).
Property
Attribute
Type
Default
Description
open
openreflects
boolean
Shown as a modal.
label
label
string
Heading (also the dialog's accessible name).
description
description
string
A line under the title (the dialog's accessible description).
size
sizereflects
string
md
Width: 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.
height
heightreflects
string
Fixed 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.
radius
radiusreflects
string
Corner radius: xs…xl, none, or a CSS length. Default: lg.
position
positionreflects
center | top
center
Vertical placement.
persistent
persistentreflects
boolean
Escape 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.
hideClose
hide-closereflects
boolean
No close button in the header.
closeLabel
close-label
string
Close(text dialog.close)
The close button's name, for screen readers.
overlayBlur
overlay-blur
string
Blur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml).
Event
Description
ray-open
After it opened.
ray-close
After it closed; detail: { returnValue }.
ray-request-close
Escape, backdrop or close button; cancelable (preventDefault keeps it open). detail: { source }.
Slot
Description
(default)
Body.
header
Extra header content, next to the title.
footer
Actions, aligned to the end.
Part
Description
dialog
The native <dialog>.
title
The heading.
description
The line under the heading.
header
The header: title, description, the header slot and the close button.
body
The scrollable body.
footer
The footer.
close
The close button.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
dialog.close
Close
dialog.confirm-label
Are you sure?
dialog.confirm
Confirm
dialog.cancel
Cancel
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
startendtopbottomxsmdxl40%
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 shoppingCheck out
Category
Sort by
ResetApply
Ada Lovelaceada@ray.dev
Passed
12:00:01 build started on runner-312:00:02 resolving 14 dependencies
12:00:04 compiled 42 modules
12:00:04warn unused import std/fs in src/sync.ray:3
12:00:05 tests: 128 passed, 0 failed
12:00:05done 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.
With native and the native bridge, the menu opens as the system's context menu at the pointer: its items and dividers, disabled ones greyed out. The choice fires the same ray-select, so the same code handles both.
<ray-menunativecontext><divslot="trigger"class="file-row">report.csv</div><ray-menu-itemvalue="open">Open</ray-menu-item><ray-menu-itemvalue="reveal">Show in Finder</ray-menu-item><ray-menu-divider></ray-menu-divider><ray-menu-itemvalue="delete"color="red">Delete</ray-menu-item></ray-menu>
Checkbox and radio items show their check mark there too. Labels, nested menus, icons and colors are the page menu's only. A dismissed native menu fires nothing.
The native menu reads its items the moment it opens, so items that depend on what was clicked go in ray-request-open, which comes first (a contextmenu listener of your own on the trigger may run after the menu's):
Preferred 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).
context
contextreflects
boolean
Opens on right click (contextmenu) over the trigger area, at the pointer.
keepOpen
keep-openreflects
boolean
Choosing an item does not close the menu.
native
nativereflects
boolean
With a native host (ray-elements/core/raylang.js in a std/ui window), opens as the system's context menu at the pointer: items and dividers, same ray-select. Where the system has none (a phone: the bridge does not offer it) or the call fails, the page's menu opens.
anchor
—
object
What 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.
Event
Description
ray-select
An item was chosen; detail: { value, item }.
ray-request-open
Its trigger is about to open it (click, Arrow keys, right click), before the items are read, native menu included: fill items that depend on what was clicked here. Cancelable (preventDefault keeps it closed). Not fired by show() or open = true. detail: { event }.
ray-open
After it opened.
ray-close
After it closed.
Slot
Description
trigger
The button that opens it, or the area for a context menu (a press on the area outside the open menu closes it; a right click reopens it at the new point).
(default)
ray-menu-item, ray-menu-label and ray-menu-divider elements.
Part
Description
dropdown
The panel.
<ray-menu-item>
Property
Attribute
Type
Default
Description
value
valuereflects
string
Reported in ray-select (default: the text).
disabled
disabledreflects
boolean
Skipped by the keyboard, cannot be chosen.
color
colorreflects
string
Text and hover color (e.g. red for destructive actions).
type
typereflects
item | checkbox | radio
item
checkbox: choosing it toggles checked (menuitemcheckbox); radio: choosing it checks it and unchecks the radio items of the menu with the same name (menuitemradio). Both show a check mark when checked, in the native menu too.
checked
checkedreflects
boolean
Checked (checkbox and radio items). Already updated when ray-select fires.
name
namereflects
string
The group of a radio item: one checked per name in the menu.
Slot
Description
(default)
Label.
left
Icon.
right
Shortcut or badge.
Part
Description
mark
The check mark of a checkbox or radio item.
<ray-menu-label>
A section caption inside the menu.
<ray-menu-divider>
A separator between groups of items.
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
ray.dev/p/ray-remoteCopy link
Filters2
Status
ClearApply
Follow
Grace HopperCompiler 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.
Positioned in JS (flip + shift to stay in the viewport). JS: show(), hide(), toggle().
Property
Attribute
Type
Default
Description
open
openreflects
boolean
Shown.
placement
placementreflects
bottom | bottom-start | bottom-end | top | top-start | top-end | left | left-start | left-end | right | right-start | right-end
bottom
Preferred 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).
offset
offset
number
8
Gap to the trigger in px.
anchor
—
object
What 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.
width
width
string
Panel width (px number or CSS length). Default: its content.
matchWidth
match-width
boolean
At least as wide as the trigger.
padding
paddingreflects
0 | xs | sm | md | lg
md
Panel padding.
trapFocus
trap-focus
boolean
Moves focus into the panel when opened and keeps Tab inside it.
Event
Description
ray-open
After it opened.
ray-close
After it closed (also by Escape or an outside click).
Slot
Description
trigger
The element that toggles it (gets aria-haspopup and aria-expanded).
(default)
Panel content.
Part
Description
dropdown
The panel.
Tooltip
A short hint on hover and focus of its child; the label also becomes the child's accessible description.
top | bottom | left | right | top-start | top-end | bottom-start | bottom-end
top
Preferred side; -start/-end follow the writing direction.
openDelay
open-delay
number
300
ms before showing.
closeDelay
close-delay
number
0
ms before hiding.
color
color
string
A palette color or any CSS color. Default: inverted foreground/background.
disabled
disabled
boolean
Never shows.
Slot
Description
(default)
The element the tooltip describes (one element).
Part
Description
tooltip
The tooltip box.
Accordion
Collapsible sections (WAI-ARIA accordion pattern); one open at a time, or several with multiple.
Variants
defaultNo. 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.
containedNo. 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.
separatedNo. 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.
filledNo. 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.
disabled item · value from codeUp to 3 projects and 1 GB of builds.Unlimited projects, signed releases and an update channel.Shared projects and roles.
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.
Property
Attribute
Type
Default
Description
name
namereflects
string
File name (ellipsized; full name in the tooltip).
size
size
number
Size in bytes, shown as "12 KB", "3.4 MB".
type
typereflects
string
MIME type: picks the icon (image or file) and, with the name, the extension badge.
src
src
string
Thumbnail URL for images (falls back to the icon if it fails to load).
href
hrefreflects
string
Makes the name a download link.
progress
progress
number
Upload progress 0–100: a thin bar and "Uploading… 45%". Unset: done.
status
statusreflects
uploading | done | error
Explicit state. Default: "uploading" while progress is set, else "done".
error
error
string
Error text shown with status="error" (default "Upload failed").
removable
removablereflects
boolean
Shows a remove (×) button.
removeLabel
remove-label
string
Remove {name}(text attachment.remove)
Accessible label of the remove button; {name} is replaced by the file name.
variant
variantreflects
row | card
row
row: a compact chip; card: the thumbnail on top.
disabled
disabledreflects
boolean
Dimmed, not removable, the name is not a link.
Event
Description
ray-remove
The remove button was pressed; cancelable (preventDefault keeps the element).
Part
Description
item
The box.
thumbnail
The thumbnail or icon box.
badge
The extension badge (PDF, PNG…).
name
The file name (a link with href).
meta
Size, upload state or error.
progress
The upload progress bar.
remove
The remove button.
<ray-attachments>
A wrapping row of ray-attachment elements.
Slot
Description
(default)
ray-attachment elements.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
attachment.remove
Remove {name}
attachment.uploading
Uploading…
attachment.uploading-percent
Uploading… {percent}%
attachment.progress
Uploading {name}
attachment.failed
Upload failed
Avatar
An image, the initials of a name, or a placeholder icon.
With variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
color
color
string
A palette color or any CSS color.
size
sizereflects
xs | sm | md | lg | xl
sm
Height and font size.
radius
radius
xs | sm | md | lg | xl | full
Corner radius. Default: full.
normalCase
normal-case
boolean
Keeps the text as written instead of uppercase.
Slot
Description
(default)
The text.
Part
Description
badge
The 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.
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).
Property
Attribute
Type
Default
Description
cite
cite
string
Who said it, shown below the quote ("— Grace Hopper").
href
href
string
URL of the source: the inner blockquote's cite attribute.
color
colorreflects
string
A palette color or any CSS color, for the edge, the mark and the tint. Default: the primary.
variant
variantreflects
light | outline | filled
light
light: tinted background; outline: border and edge only; filled: solid color (a pull quote).
icon
icon
string
quote
Registry icon of the mark, or none. The icon slot replaces it.
size
sizereflects
sm | md | lg
md
Text size (lg for a pull quote).
padding
paddingreflects
string
Inner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md.
hideEdge
hide-edgereflects
boolean
No colored edge on the start side (the tint, border and mark stay).
radius
radiusreflects
string
Corner radius: xs…xl, none, or a CSS length. Default: md.
Slot
Description
(default)
The quotation (text or paragraphs).
cite
Rich attribution, instead of cite.
icon
A custom mark, instead of icon.
Part
Description
quote
The <blockquote>.
icon
The disc with the mark.
cite
The attribution (a <figcaption>).
Carousel
Slides in a scroll-snap viewport: native swipe and scrolling, previous/next controls, indicators, keyboard, loop and autoplay with a pause button.
Any child is a slide. With several slides in view, positions are the snap points the viewport can reach. ArrowLeft/Right (Up/Down when vertical), Home and End move it.
Property
Attribute
Type
Default
Description
index
index
number
0
Current position (0-based). Setting it scrolls there.
label
label
string
Carousel(text carousel.label)
Accessible name of the carousel region.
slideSize
slide-size
string
Size of each slide along the scroll axis ("100%" by default; "50%", "18rem"…).
slideGap
slide-gap
string
Space between slides (default var(--ray-space-4)).
align
alignreflects
start | center
start
Where a slide snaps in the viewport.
orientation
orientationreflects
horizontal | vertical
horizontal
Scroll axis (vertical needs a height; 20rem by default).
loop
loopreflects
boolean
next() on the last position goes to the first, prev() on the first to the last.
autoplay
autoplay
number
0
Milliseconds between automatic moves (0: off). Pauses on hover, focus and when the page is hidden; starts paused with reduced motion. Shows a pause/play button.
hideControls
hide-controlsreflects
boolean
No previous/next buttons.
hideIndicators
hide-indicatorsreflects
boolean
No indicator dots.
Event
Description
change
The current position changed (read `index`) by the user or a method (controls, indicators, keyboard, swipe, scroll, next/prev/goTo, autoplay) — not when `index` is set by code.
Slot
Description
(default)
The slides.
Part
Description
viewport
The scrolling viewport.
previous
The previous button.
next
The next button.
indicators
The row of indicator dots.
indicator
Each indicator dot ([aria-current] on the active one).
play
The pause/play button (with autoplay).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
carousel.label
Carousel
carousel.slide
slide
carousel.position
{index} of {count}
carousel.previous
Previous slide
carousel.next
Next slide
carousel.go-to
Go to slide {index}
carousel.play
Start autoplay
carousel.pause
Pause autoplay
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.
# Build and bundle the desktop app
ray build --native --release src/main.ray
ray bundle --name "Ray Remote" -o dist
echo "done: $HOME/dist"
@@ -68,3 +68,4 @@
- .body { flex: 1; overflow: auto; }
+ /* Safari collapses a 0% basis under a max-height. */
+ .body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.footer { display: flex; }
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.
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.
Property
Attribute
Type
Default
Description
code
—
string
The code, from script (the most convenient in React and Vue). Wins over the content.
language
languagereflects
string
The 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.
filename
filename
string
A file name or title in the header; also the scroll region's accessible name.
lineNumbers
line-numbersreflects
boolean
Numbers each line (not copied, not selectable).
highlight
highlight
string
Lines to highlight: "3, 5-7".
wrap
wrapreflects
boolean
Wraps long lines instead of scrolling sideways.
verbatim
verbatimreflects
boolean
Shows 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.
maxHeight
max-height
string
Height before it scrolls: px as a number, or a CSS length. A taller block gets a "Show all N lines" button.
expanded
expandedreflects
boolean
Shown whole, past max-height.
hideCopy
hide-copyreflects
boolean
No copy button.
hideHeader
hide-headerreflects
boolean
No header bar (the copy button floats in the corner).
size
sizereflects
xs | sm | md
sm
Font size.
radius
radiusreflects
string
Corner radius: xs…xl, none, or a CSS length. Default: md.
copyLabel
copy-label
string
Copy code(text code.copy)
Accessible name of the copy button.
copiedLabel
copied-label
string
Copied(text code.copied)
Shown and announced after copying.
Event
Description
ray-copy
The code was copied.
Slot
Description
(default)
The code: text, a <template> or a <script type="text/plain">.
Part
Description
frame
The box.
header
The bar with the file name, the language and the copy button.
copy
The copy button.
scroller
The scroll box (focusable, to scroll with the keyboard).
code
The <code> with one .line per line.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
code.copy
Copy code
code.copied
Copied
code.region
Code
code.region-language
{language} code
code.show-all
Show all {count} lines
code.show-less
Show 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
xssmmdlgxl2.5rem
Stroke
11.52 (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
bluegreenyellowredviolet#0ea5e9
In context
New projectExport Passing
Inline with text, an icon follows the font: run ray test, then open report.html.
Swap the set
Filled setReplaces icons app-wide: the gallery above and every component follow.
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.
Property
Attribute
Type
Default
Description
name
namereflects
string
Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
filled
filledreflects
boolean
The 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.
mirror
mirrorreflects
boolean
Mirrored 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.
size
sizereflects
string
xs…xl or any CSS length. Default: --ray-icon-size, else 1em (the font).
label
label
string
Accessible name; without it the icon is decorative (hidden from screen readers).
color
colorreflects
string
A palette color or any CSS color. Default: the text color.
stroke
stroke
number
Stroke width for stroke icons (default: --ray-icon-stroke, 2).
Part
Description
icon
The 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.
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").
Property
Attribute
Type
Default
Description
label
label
string
Text in the indicator (a word or a count). Empty: a dot.
default: raised keycap; filled: flat muted chip; outline: flat with a border.
Slot
Description
(default)
The key name.
Part
Description
kbd
The 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)
Drums
Bass
Keys
Master
The meter's own scale (scale), when there is no fader
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.
Property
Attribute
Type
Default
Description
min
min
number
-60
The dB at the bottom: lower levels show nothing.
max
max
number
6
The dB at the top.
warn
warn
number
-12
Where the yellow zone starts (dB).
danger
danger
number
-3
Where the red zone starts (dB).
clip
clip
number
0
A 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.
channels
channels
number
1
The bars: 1 (mono), 2 (stereo)…
orientation
orientationreflects
vertical | horizontal
vertical
vertical: bars that rise, the scale before them (on the left, aligned against them); horizontal: bars that grow towards the inline end.
size
sizereflects
xs | sm | md | lg
sm
The thickness of each bar.
hold
hold
number
1500
How long the peak hold line stays (ms); 0: no line.
falloff
falloff
number
24
How fast a lower level falls (dB per second); 0: at once.
scale
scalereflects
boolean
Shows 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.
taper
taperreflects
linear | fader
linear
How 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
—
array
Your own scale, in dB (replaces the one of scale).
label
label
string
Level(text meter.label)
The accessible name.
Event
Description
ray-clip
A channel's peak reached clip (once until its mark is cleared).
Part
Description
channels
The bars (role=meter).
channel
One channel (data-clipped when clipped).
track
A bar's track.
peak
The peak level (translucent).
rms
The RMS level (solid).
hold
The peak hold line.
scale
The dB scale.
tick
A label of the scale.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
meter.label
Level
meter.value
{value} dB
meter.silent
Silence
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 PNGDownload 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
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".
Property
Attribute
Type
Default
Description
value
value
string
The text or link to encode. Empty: nothing is drawn.
ecc
eccreflects
L | M | Q | H
M
Error 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.
size
sizereflects
string
md
The side, quiet zone included: xs (4rem), sm (6rem), md (8rem), lg (12rem), xl (16rem), or any CSS length.
quietZone
quiet-zone
number
4
The light margin around the code, in modules (the standard asks for 4; 2 reads well on a plain background).
color
color
string
The modules' color: a palette color or any CSS color (default black). Keep it dark.
background
background
string
The background, any CSS color (default white). Keep it light.
label
label
string
Its 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.
Event
Description
ray-error
The value does not fit in a QR code (over about 2,900 bytes at L); nothing is drawn.
Slot
Description
(default)
A logo for the middle (an <img> or an <svg>), on the background color, 22 % of the code's side.
Part
Description
code
The <svg>.
background
The background rectangle.
modules
The path of the dark modules.
logo
The logo's box.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
qr.label
QR code
Stat
A metric tile: label, value, change against a previous period, note.
Change (positive is shown as good, in green; see inverse).
diffUnit
diff-unit
string
%
Unit of diff.
note
note
string
A line under the value (compared to…).
inverse
inversereflects
boolean
Lower is better (errors, latency): negative diffs are green.
plain
plainreflects
boolean
Without the card around.
Slot
Description
icon
Icon 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).
Key
English
stat.up
Up {value}
stat.down
Down {value}
stat.flat
No 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.
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).
Property
Attribute
Type
Default
Description
columns
—
array
Columns: key, label, width, align, sortable, part (an extra part name for its th and td cells), render(row, index), sort(a, b).
data
—
array
Rows (objects).
rowKey
row-key
string
id
Field that identifies a row (selection).
selectable
selectablereflects
boolean
A checkbox per row and a select-all checkbox.
selection
—
array
Keys of the selected rows.
sort
—
string
Current sort; set it, or let header clicks change it.
manualSort
manual-sort
boolean
Do not sort here: listen to ray-sort and pass sorted data.
clickableRows
clickable-rowsreflects
boolean
Rows are focusable and fire ray-row-click (Enter too; arrows move between rows).
striped
stripedreflects
boolean
Alternate row background.
withBorder
with-borderreflects
boolean
Border around the table.
withColumnBorders
with-column-bordersreflects
boolean
Borders between columns.
stickyHeader
sticky-headerreflects
boolean
The header stays visible while scrolling (with --ray-table-max-height).
noHover
no-hoverreflects
boolean
No row highlight on hover.
density
densityreflects
xs | sm | md | lg
sm
Cell padding.
label
label
string
Caption (also the table's accessible name).
emptyLabel
empty-label
string
No data(text table.empty)
Text without rows (or put a ray-empty-state in slot=empty).
Event
Description
ray-sort
A header changed the sort.
ray-selection-change
The selection changed.
ray-row-click
A row was clicked or activated with Enter (clickable-rows).
Slot
Description
empty
Shown instead of the empty text when there are no rows.
Part
Description
table
The <table>.
scroll
The scroll container.
th
Every header cell (also named by its column's part).
td
Every body cell (also named by its column's part).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
table.empty
No data
table.select-all
Select all rows
table.select-row
Select 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.← BackAdvance →Fail the upload
Side of the line: start/end follow the writing direction; left/right are sides of the screen.
bulletSize
bullet-size
string
Bullet size: px as a number or a CSS length (default 20px).
lineWidth
line-width
number
Line width in px (default 2).
color
colorreflects
string
A palette color or any CSS color for what is reached (default: primary).
reverseActive
reverse-activereflects
boolean
Counts active from the end (the latest event at the top).
Slot
Description
(default)
ray-timeline-item elements.
<ray-timeline-item>
Property
Attribute
Type
Default
Description
label
label
string
The title of the event.
time
time
string
When ("2 h ago", a date).
icon
icon
string
An icon of the registry in the bullet.
color
colorreflects
string
Its own color (a failed step in red).
lineVariant
line-variantreflects
solid | dashed | dotted
solid
The line to the next item (dashed: not happened yet).
Slot
Description
(default)
Details under the title.
bullet
A custom bullet (an avatar, an image).
Part
Description
bullet
The bullet.
line
The line to the next item.
body
Title, details and time.
title
The title.
time
The 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.
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.
NotifyWith an actionLoading → doneError
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.zipSunday, December 3 at 9:00 AM
Several toasts stack; hover (or tap, on touch screens) to spread them. Swipe one sideways to dismiss it.
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.
Property
Attribute
Type
Default
Description
label
label
string
Title.
color
colorreflects
string
Status color: tints the status icon (and a slotted icon's circle).
icon
icon
string
Status icon from the registry (default: from the color); "none" for no icon.
loading
loadingreflects
boolean
Shows a spinner (notify() does not auto-close it).
hideClose
hide-closereflects
boolean
No close button.
withBorder
with-borderreflects
boolean
Draws a border.
actionLabel
action-label
string
Text of an action button (e.g. "Undo"); pressing it fires ray-action.
actionIcon
—
object
Before the action's text: an icon name, or a node (a <ray-pulse> while an alarm rings).
actions
—
object
Several 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.
Event
Description
ray-close
The close button was pressed.
ray-action
An action button was pressed; detail.index says which (notify() runs its onClick and closes it).
Slot
Description
(default)
Message.
action
Your own action controls (ray-button…), beside the close button, after the action buttons.
icon
Your own icon, in a colored circle (replaces the status icon).
Part
Description
actions
The row of action buttons and the action slot.
action
Each action button. Each also has the part action-<index> (action-0, action-1…) and, with a name, action-<name>, to style one alone.
status-icon
The 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.
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).
Property
Attribute
Type
Default
Description
variant
variantreflects
cluster | breathe | ripple | dots
cluster
The 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).
count
countreflects
number
Number of circles, 1 to 5 (more are clamped). Default: the variant's.
shape
shapereflects
filled | ring
Filled discs (concentric ones fade with size, see --ray-pulse-floor) or outlined rings. Default: the variant's.
fade
fadereflects
out | none
Whether a cycle ends transparent; the bare attribute means out. Default: the variant's (ripple and dots fade).
direction
directionreflects
alternate | normal
alternate goes there and back; normal goes one way and restarts (with fade: the ripple). Default: the variant's.
color
colorreflects
string
A palette color or any CSS color. Default: the primary color.
size
sizereflects
xs | sm | md | lg | xl
md
Height of the figure (the dots variant is wider).
label
label
string
Loading(text pulse.label)
Text read by screen readers.
Part
Description
pulse
The box holding the circles.
dot
Each circle (the static center of ripple is also part core).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
pulse.label
Loading
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.
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.
Property
Attribute
Type
Default
Description
value
value
number
Progress, from 0 to max. Unset: indeterminate (a spinning arc).
max
max
number
100
The value of a full ring.
color
colorreflects
string
A palette color or any CSS color. Default: the primary color.
size
sizereflects
string
md
Diameter: xs…xl (3, 5, 7.5, 10, 12.5rem) or any CSS length.
thickness
thicknessreflects
string
Width of the ring: a CSS length (a bare number is px). Default: a tenth of the diameter.
roundCaps
round-capsreflects
boolean
Rounded ends of the arc.
showValue
show-valuereflects
boolean
Shows the percentage in the middle (when the default slot is empty).
label
label
string
Accessible name (default: Progress).
Slot
Description
(default)
The middle of the ring (a clock, a figure, an icon); its font scales with size.
Part
Description
track
The background circle.
bar
The arc.
center
The middle, around the default slot.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
ring-progress.label
Progress
Skeleton
A placeholder while content loads: a shimmering block, a circle or text lines; with loaded it shows its content.
A palette color or any CSS color. Default: the primary color.
size
sizereflects
xs | sm | md | lg | xl
md
Diameter.
label
label
string
Loading(text spinner.label)
Text read by screen readers.
Part
Description
spinner
The ring.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
spinner.label
Loading
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
PreviousNext
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.
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.
Property
Attribute
Type
Default
Description
count
count
number
0
Number of steps (dots).
value
value
number
0
The current step, 0-based; count means every step is done.
color
colorreflects
string
A palette color or any CSS color for done and current dots. Default: the primary color.
size
sizereflects
xs | sm | md | lg | xl
sm
Size of a dot.
align
alignreflects
start | center | end
center
Where the row sits in its width.
label
label
string
What 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.
valueText
value-text
string
The 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}".
doneText
done-text
string
The announced text once every step is done (value = count), with {count}. Default: value-text, else "{count} of {count}, done".
Part
Description
dots
The row.
dot
Each dot ([data-state] done, current or todo).
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
step-dots.label
Steps
step-dots.value
{label} {step} of {count}
step-dots.step
Step
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
CancelDone
center (iOS) and scroll-behavior="hide": away going down, back going up
variant="filled" with a search row (the bottom slot)
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.
Property
Attribute
Type
Default
Description
label
label
string
The title.
description
description
string
A line under the title.
center
centerreflects
boolean
The title centered (iOS).
variant
variantreflects
default | filled | transparent
default
default: the page background; filled: the primary color; transparent: until it elevates.
size
sizereflects
sm | md | lg
md
Height: 48, 56 or 64 px.
scrollBehavior
scroll-behaviorreflects
elevate | hide | none
elevate
While the content scrolls: elevate (border and shadow), hide (also slides away going down, back going up), none.
sticky
stickyreflects
boolean
Sticks to the top of the window (outside a shell).
scrollTarget
scroll-target
string
A selector of the element whose scrolling it follows (default: its shell's, else the window).
Slot
Description
(default)
Title content after the label (a heading, a select).
start
Before the title: back or menu button.
end
Actions.
bottom
A row under the bar: tabs, a search field.
Part
Description
bar
The bar.
start
The start area.
title
The title area.
end
The actions area.
bottom
The 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.
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.
Property
Attribute
Type
Default
Description
layout
layoutreflects
default | alt
default
default: the header across the top; alt: the navbar full height, the header beside it.
breakpoint
breakpoint
string
48em
Width (px, em or rem) below which it takes the phone layout.
padding
paddingreflects
string
Padding of the main area: xs…xl, a number (px) or a CSS length.
Event
Description
ray-breakpoint
It switched between the wide and the phone layout.
Slot
Description
(default)
The main content (it scrolls).
header
Top bar: a ray-app-bar or a header of your own.
navbar
Side navigation (a ray-sidebar). Wide screens only.
aside
A panel on the other side (details, an inspector). Wide screens only.
footer
Under the main content.
bottom
Phones only: a ray-bottom-nav.
Part
Description
shell
The grid.
header
The header area.
navbar
The navbar area.
main
The scrolling main area.
aside
The aside area.
footer
The footer area.
bottom
The bottom bar area.
Aspect ratio
A box with a fixed width/height ratio; its image, video or iframe fills it.
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 · 540pxsm · 720pxmd · 960px (default)lg · 1140pxsize="30rem" padding="xl"fluid: the whole width, still padded
Maximum width: xs 540px, sm 720px, md 960px, lg 1140px, xl 1320px, or any CSS length.
padding
paddingreflects
string
md
Side padding: xs…xl, a number (px) or a CSS length.
fluid
fluidreflects
boolean
No maximum width: the whole width, still padded.
Slot
Description
(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.
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".
Property
Attribute
Type
Default
Description
cols
colsreflects
string
1
Columns: a count, then counts from a width up ("1 sm:2 lg:4").
minColWidth
min-col-width
string
Instead of cols: as many columns of at least this width as fit ("14rem", 220).
gap
gapreflects
string
md
Space between cells: xs…xl, a number (px) or a CSS length.
rowGap
row-gap
string
Space between rows when it differs from gap.
align
alignreflects
stretch | start | center | end
stretch
Vertical alignment of the cells in a row.
Slot
Description
(default)
The cells (data-span="2" or "full" to span).
Part
Description
grid
The 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
raylangweb componentsdesign tokensaccessibilityReactVuedark modeCancelSave changesnowrap keeps the row on one line; this text truncates instead of wrapping under the avatar.
A flex row on the host: the children are laid out directly, no wrapper.
Property
Attribute
Type
Default
Description
gap
gapreflects
string
md
Space between children: xs…xl (the space scale), a number (px) or any CSS length.
align
alignreflects
center | start | end | stretch | baseline
center
Cross-axis alignment.
justify
justifyreflects
start | center | end | space-between | space-around | space-evenly
start
Main-axis distribution: space-between for a title on one side and actions on the other.
nowrap
nowrapreflects
boolean
Keeps the children on one line.
grow
growreflects
boolean
The children share the width equally.
Slot
Description
(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()
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.
Property
Attribute
Type
Default
Description
height
height
string
Height (CSS length).
maxHeight
max-height
string
Maximum height: it grows with its content up to this, then scrolls.
orientation
orientationreflects
vertical | horizontal | both
vertical
Which ways it scrolls.
type
typereflects
auto | hover | never
auto
The scrollbar: auto (when it scrolls), hover (while hovered or scrolling), never (still scrolls).
noShadows
no-shadowsreflects
boolean
No edge shadows.
threshold
threshold
number
48
Distance from the end (px) at which ray-reach-end fires.
label
label
string
Accessible name: makes the scrolling box a named region.
Event
Description
ray-reach-end
The end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left).
Slot
Description
(default)
The content.
Part
Description
viewport
The scrolling box.
shadow
The edge shadows.
Separator
A horizontal or vertical rule, optionally labeled (Mantine's Divider).
Where the label sits: start/end follow the writing direction; left/right are sides of the screen.
size
sizereflects
xs | sm | md | lg | xl
xs
Thickness (1–5px).
variant
variantreflects
solid | dashed | dotted
solid
Line style.
Part
Description
line
The rule without label.
label
The 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;
23fn main() -> int {
4 print("hello from raylang");
506}
Terminal
$ ray run
hello from raylang
✓ exited with 0 in 41 ms
mainLn 4, Col 5Drag a divider, or focus it and use the arrowsraylang
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
ray·elements
Collapsed until needed: the results open when the query runs
medications.sqlRun
1select name, dose, next_at
2from alarms
3where active = 14order by next_at;
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".
Property
Attribute
Type
Default
Description
orientation
orientationreflects
horizontal | vertical
horizontal
horizontal: side by side; vertical: stacked.
fixed
fixedreflects
start | end
start
The 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.
position
position
string
50%
Initial size of the sized pane: px (280) or any CSS length (30%, 20rem).
min
min
number
0
Minimum size of the sized pane in px.
max
max
number
Maximum size of the sized pane in px.
collapsed
collapsedreflects
boolean
The sized pane is hidden.
disabled
disabledreflects
boolean
The divider cannot be moved.
autosave
autosave
string
A key: the size and the collapsed state are saved in localStorage and restored (a saved state wins over the collapsed attribute).
Event
Description
ray-resize
After a drag, a key or a collapse.
Slot
Description
start
The first pane: sized (a sidebar), or the one that takes the rest with fixed="end".
end
The second pane: the one that takes the rest, or sized with fixed="end" (an inspector).
Part
Description
divider
The separator.
start
The start pane.
end
The end pane.
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
Key
English
split.resize
Resize
Stack
Its children in a column, spaced by the space scale (Mantine's Stack): forms, panels, anything stacked.
A form, stacked
Create a workspaceEveryone you invite joins it.Create