Quick start guide and documentation
| Class | Color | Use Case |
|---|---|---|
.btn-success |
● Green | Primary actions, save, submit, confirm |
.btn-danger |
● Red | Destructive actions, delete, remove, cancel |
.btn-warning |
● Yellow | Caution actions, warnings, proceed with care |
.btn-info |
● Cyan | Informational actions, details, learn more |
.btn-default |
● Gray | Secondary actions, neutral, cancel (non-destructive) |
| Class | Padding | Font Size | Use Case |
|---|---|---|---|
.btn-small |
0.25rem × 0.5rem | 0.875rem (14px) | Toolbars, compact UIs, dense layouts |
| (default) | 0.5rem × 1rem | 1rem (16px) | Forms, modals, general use |
.btn-large |
0.75rem × 1.5rem | 1.25rem (20px) | Hero sections, CTAs, emphasis |
| Class | Effect |
|---|---|
.btn-wrapper |
Container for button groups (centered by default) |
.btn-wrapper-left |
Left-align buttons within wrapper |
.btn-wrapper-right |
Right-align buttons within wrapper |
.btn-wrapper-line |
Add top border to button group |
Every button must have the base .btn class plus a variant class.
Add FontAwesome icons for visual context.
Always include aria-label for accessibility.
Use the disabled attribute to prevent interaction.
Use <a> tags for navigation, <button> for actions.
Documentation
Use .btn-wrapper to group related buttons with consistent spacing and alignment.
.btn-wrapper-line class adds a 1px top border.
Standard form submit/cancel pattern
Dangerous action with clear visual hierarchy
Full-width button in card layout
Compact icon buttons for editor toolbars
<button> for actions, <a> for navigationScreen readers need text to announce button purpose. Always include aria-label for icon-only buttons:
Buttons work seamlessly with RSL's grid system and utility classes.
.btn-success for primary actions and .btn-default for secondary actions to establish visual hierarchy
.btn-danger exclusively for destructive actions like delete/remove to avoid confusion
type="button" for buttons inside forms to prevent accidental form submission
.btn class alone—always combine with a variant class (.btn-success, .btn-default, etc.)
buttons.css is loaded.btn and variant class are present (e.g., class="btn btn-success")disabled attribute.btn:hover stylesfas fa-check, not fa-check alone).btn-wrapper class (not .btn-wrapper-left or .btn-wrapper-right).btn-wrapper| Property | Value |
|---|---|
| Display | inline-block |
| Padding | 0.5rem 1rem (default) |
| Border | 1px solid (matches background color) |
| Border Radius | 4px |
| Font Size | 1rem (default) |
| Transition | all 0.2s ease |
| Hover Opacity | 0.8 |
View buttons.html for realistic use cases
Use playground.html as a starting point
Learn about RSL Grid System for responsive layouts