Live examples and demonstrations
This example page demonstrates a modern set of form elements: field tiles, chip checkboxes, choice cards, custom select, toggle, slider, file tile, and a composed form layout.
Get up and running in 5 minutes with our Quick Start Guide!
View Quick Start Guide
All components on this page are driven by CSS custom properties and can be themed with
data attributes on any wrapper node (for example <form>,
.rsl-select, .rsl-toggle, or the page
.container).
Set colors and radius once and let your entire form inherit:
data-field-bg, data-field-border, data-field-radius, data-field-text, data-field-muted, data-field-focus, data-field-error, data-field-successdata-chip-bg, data-chip-borderdata-choice-bgdata-select-bgdata-toggle-off, data-toggle-ondata-slider-track, data-slider-filldata-file-bgYou can mix and match these attributes at different levels. Inner components will inherit values from the closest ancestor that sets them.
A tile-style text input with clear states, helper text, and focus treatment. Theme it by dropping data attributes on the form or a parent container.
API notes: Use data-field-bg, data-field-border,
data-field-text, data-field-muted, and data-field-focus
on any ancestor to control the tile background, border, text, helper color and focus glow.
Compact pill-style checkboxes that are fully clickable and keyboard accessible. The chip surface and active border are themeable via data attributes.
API notes: Use data-chip-bg and
data-chip-border on a parent to change chip background and border.
Active color uses data-field-focus when present.
Radio inputs upgraded into clickable cards for plan selection. The base tile uses the
same data-field-* variables; you can override just the card body with
data-choice-bg.
API notes: Use data-choice-bg to set the resting background
for cards. Focus and selected states use data-field-focus.
A button-driven custom select with a floating options panel. Uses a hidden input for form submissions and is fully keyboard accessible.
API notes: Use data-select-bg for the button surface and
data-field-focus for the open border and outline. Nested fields use the same
data-field-* variables as text inputs.
-
System default
-
Light
-
Dark
A compact toggle with label and helper text. The off and on colors can be tuned per-toggle.
API notes: Use data-toggle-off for the track/thumb at rest
and data-toggle-on for the active color. You can set these on individual
toggles or at the form level.
A range slider with live value readout and customizable track/fill colors.
API notes: Use data-slider-track to control the base track
color and data-slider-fill for the thumb/fill color.
A tile-style file input with drag-and-drop affordance and keyboard activation via Enter/Space.
API notes: Use data-file-bg for the tile background.
Other field variables (border, text, muted) are inherited from ancestors.
A small settings form combining multiple components.
RSL also includes a lightweight basic form system (form.css) for simpler use cases.
These elements have minimal styling and work with the same form-validation.js as the modern form elements above.
Drag and drop images or click to browse. Previews appear below.
Note: Both form systems work with form-validation.js.
Add the input-required class to any input for automatic validation on submit.
This final example shows how you can compose a more complete, production-style form for an app or workspace setup using only RSL form primitives, the slot layout grid, and the theming API.