forcedotcom/sf-skills / skills/design-systems-slds-apply
design-systems-slds-apply
UnverifiedApply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include "build a modal", "create a form", "data table", "SLDS styling", "style with hooks", "add an icon".
assets/blueprints/components/slider.yaml
View on GitHubname: "Slider"
description: "An input control that allows users to select a numeric value from a range by dragging a handle along a track, providing visual feedback for value selection."
category: "Input"
slds_classes:
root: "slds-slider"
elements:
- class: "slds-slider__range"
description: "The slider track element"
purpose: "Visual track that shows the selectable range"
modifiers:
- class: "slds-slider_vertical"
description: "Vertical slider orientation"
usage: "When vertical layout is preferred or required"
states:
- class: "slds-has-error"
description: "Error state styling"
trigger: "When slider validation fails"
- class: "slds-is-disabled"
description: "Disabled state styling"
trigger: "When slider is not interactive"
variants:
- name: "Base"
description: "Standard horizontal slider"
classes:
- "slds-slider"
usage_context: "Default slider implementation for numeric range selection"
differences: "Horizontal slider with draggable handle on track"
lightning_component:
name: "lightning-slider"
url: "https://developer.salesforce.com/docs/component-library/bundle/lightning-slider"
mapping_notes: "Direct mapping - Lightning component implements SLDS slider blueprint"
accessibility:
keyboard_support:
- "Tab to focus the slider"
- "Arrow keys to adjust value in increments"
- "Page Up/Page Down for larger increments"
- "Home/End to go to minimum/maximum values"
screen_reader:
- "Current value announced when changed"
- "Range minimum and maximum communicated"
- "Step increment information provided"
- "Label and purpose announced"
aria_attributes:
- "role='slider' for the input element"
- "aria-valuenow for current value"
- "aria-valuemin for minimum value"
- "aria-valuemax for maximum value"
- "aria-label describing the slider purpose"
- "aria-describedby for additional instructions"
usage_guidelines:
when_to_use:
- "For selecting numeric values from a continuous range"
- "When visual feedback of value position is helpful"
- "For settings or configuration values"
- "When precise value selection with constraints is needed"
when_not_to_use:
- "For discrete value selection (use select or radio instead)"
- "When exact precision is critical (use numeric input)"
- "For very large ranges where slider becomes impractical"
best_practices:
- "Provide clear labels for minimum and maximum values"
- "Use appropriate step increments for the use case"
- "Show current value clearly"
- "Ensure adequate touch target size for mobile"
- "Provide keyboard accessibility"
common_mistakes:
- "Making slider too small for precise interaction"
- "Using inappropriate step sizes"
- "Not showing current value"
- "Poor keyboard navigation implementation"
code_examples:
- title: "Basic Slider"
code: |
<div class="slds-form-element">
<label class="slds-form-element__label" for="slider-id-01">Slider Label</label>
<div class="slds-form-element__control">
<div class="slds-slider">
<input type="range" id="slider-id-01" class="slds-slider__range" value="50" min="0" max="100" step="1" />
<span class="slds-slider__value" aria-hidden="true">50</span>
</div>
</div>
</div>
styling_hooks:
- name: "--slds-c-slider-track-color-background"
description: "Background color for slider track"
category: "color"
dependencies:
css_files:
- "slider.css"
- "form-element.css"
javascript: []
icons: []
other_components:
- "form-element"
related_components:
- name: "Input"
relationship: "alternative"
description: "Alternative for precise numeric input"
- name: "Progress Bar"
relationship: "similar"
description: "Similar visual concept for showing values"
- name: "Range Input"
relationship: "variant"
description: "Dual-handle slider for range selection"
references:
official_docs: "https://v1.lightningdesignsystem.com/components/slider/"
metadata:
version: "1.0.0"
last_updated: "2025-11-12"
review_status: "complete"
notes: " Cleaned invalid classes and CSS variables on 2025-11-12 using slds-plus.css as source of truth."
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |