Quick start guide and documentation
RSL provides two complete form systems. Pick the one that fits your project:
Dark-themed, polished UI components
Files: form-elements.css
Lightweight, minimal styling
Files: form.css
form-validation.js script.
We'll never share your email.
| Class | Element | Description |
|---|---|---|
.rsl-field-tile |
<div> |
Container for the entire field |
.rsl-field-label |
<label> |
Small uppercase label |
.rsl-field-body |
<div> |
Wraps input + optional icon |
.rsl-field-input |
<input> |
The actual input element |
.rsl-field-helper |
<p> |
Helper text below input |
.rsl-field-bar |
<div> |
Animated bottom bar (decorative) |
Apply these to any parent element (like <form>) to theme all fields inside:
| Attribute | Controls | Default |
|---|---|---|
data-field-bg |
Field background color | #111418 |
data-field-border |
Field border color | #2d3440 |
data-field-text |
Input text color | #e5e7eb |
data-field-muted |
Label & helper text color | #9ca3af |
data-field-focus |
Focus glow color | #6e7bff |
data-field-error |
Error state color | #f97373 |
Pill-style checkboxes that are fully clickable and keyboard accessible.
| Class | Description |
|---|---|
.rsl-chip-row |
Container for chip group |
.rsl-chip |
Individual chip (label element) |
.rsl-chip-input |
Hidden checkbox input |
.rsl-chip-check |
Checkmark indicator |
.rsl-chip-label |
Chip text label |
Card-style radio buttons perfect for pricing tiers or feature selection.
Fully keyboard-accessible custom select dropdown (not native).
Select an option
- Option 1
- Option 2
- Option 3
iOS-style toggle switch with smooth animations.
Custom-styled range slider with value display.
form-elements.js script automatically updates the value display as you drag.
Styled file upload with optional drag & drop preview.
data-enable-preview="true" and include drag-drop-image.js to show image thumbnails with delete buttons.
For simple projects that need minimal styling and smaller file sizes.
| Class | Element | Description |
|---|---|---|
.form |
<form> |
Form container with flex layout |
.form-group |
<div> |
Field container (label + input) |
.form-label |
<label> |
Field label |
.form-input |
<input> |
Text, email, number inputs |
.form-textarea |
<textarea> |
Multi-line text input |
.form-select |
<select> |
Native dropdown select |
.form-radio |
<label> |
Custom radio button |
.form-checkbox |
<label> |
Custom checkbox |
Works with both Modern and Basic forms. Add validation with a single class or attribute.
Use either class="input-required" or data-required="true":
| Feature | Description |
|---|---|
| Empty Field Check | Validates all text inputs, textareas, selects |
| Email Validation | Checks proper email format (@ and domain) |
| URL Validation | Validates URL structure for url inputs |
| Number Validation | Checks min/max ranges for number inputs |
| Radio/Checkbox Groups | Ensures at least one option selected |
| Error Styling | Adds .input-error class automatically |
| Error Message | Shows banner at top of form |
| Auto-Focus | Focuses first error field |
| Real-time Clearing | Removes error as user types |
form-elements.css is loaded.rsl-field-tile, .rsl-field-input)layout.js loaded before other scriptsform-elements.js is loadeddata-open="false" attribute presentform-validation.js loadedclass="input-required" or data-required="true" present<form> elementdrag-drop-image.js loadeddata-enable-preview="true" on .rsl-file-tileform.css loaded for preview styles<form> element
.rsl-form-demo class for consistent spacing between fields
novalidate to forms to disable browser validation and use RSL validation only
Open form-elements.html for live demos
Copy from playground.html
Use forms with RSL's grid system for layouts