Live Examples
HTML Structure
<div class="grid sidebar-layout">
<aside>
<ul class="links">
<li><a href="#appearance">Appearance</a></li>
<li><a href="#notifications">Notifications</a></li>
</ul>
</aside>
<main>
<fieldset id="appearance">
<legend>Appearance</legend>
<!-- Settings cards -->
</fieldset>
</main>
</div>
Modifiers
- `.sidebar-layout` - Applied to `.grid` to create a typical settings layout with a narrower aside and wider main content area.
Features
- Sidebar Navigation - Easy access to different setting sections
- Panel Switching - Smooth transitions between settings categories
- Toggle Switches - Binary on/off controls for preferences
- Dropdown Selects - Choose from multiple options
- Setting Groups - Organize related settings
- Descriptions - Helpful text explaining each setting
Use Cases
- User Preferences - Appearance, theme, language settings
- Notification Control - Manage email and push notifications
- Privacy Settings - Control data sharing and visibility
- Account Management - Password, security, 2FA
- Integration Settings - API keys, connected services
- Developer Options - Advanced features for power users
Accessibility
- Use semantic button elements for navigation
- Include proper ARIA labels for toggle switches
- Support keyboard navigation with arrow keys
- Indicate active panel visually and via ARIA
- Use sufficient color contrast for all elements
- Group related settings with fieldset/legend
Best Practices
- Clear Organization - Logically group related settings
- Descriptive Labels - Explain what each setting does
- Defaults - Show default values for each setting
- Save Feedback - Confirm when settings are saved
- Search - Optional: allow searching settings
- Reset Option - Allow users to reset to defaults