Skip to content

forcedotcom/sf-skills / skills/design-systems-slds-apply

design-systems-slds-apply

Unverified

Apply 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".

FileKindSize
SKILL.mdskill md14.6 KB
assets/README.mdmarkdown2.3 KB
assets/blueprints/components/accordion.yamlconfig15.0 KB
assets/blueprints/components/activity-timeline.yamlconfig3.8 KB
assets/blueprints/components/alert.yamlconfig4.4 KB
assets/blueprints/components/app-launcher.yamlconfig3.8 KB
assets/blueprints/components/avatar-group.yamlconfig3.2 KB
assets/blueprints/components/avatar.yamlconfig3.5 KB
assets/blueprints/components/badges.yamlconfig3.3 KB
assets/blueprints/components/brand-band.yamlconfig12.9 KB
assets/blueprints/components/breadcrumbs.yamlconfig4.0 KB
assets/blueprints/components/builder-header.yamlconfig10.1 KB
assets/blueprints/components/button-groups.yamlconfig3.1 KB
assets/blueprints/components/button-icons.yamlconfig12.9 KB
assets/blueprints/components/buttons.yamlconfig9.4 KB
assets/blueprints/components/cards.yamlconfig4.6 KB
assets/blueprints/components/carousel.yamlconfig6.0 KB
assets/blueprints/components/chat.yamlconfig9.7 KB
assets/blueprints/components/checkbox-button-group.yamlconfig8.3 KB
assets/blueprints/components/checkbox-button.yamlconfig13.8 KB
assets/blueprints/components/checkbox-toggle.yamlconfig7.7 KB
assets/blueprints/components/checkbox.yamlconfig4.4 KB
assets/blueprints/components/color-picker.yamlconfig8.5 KB
assets/blueprints/components/combobox.yamlconfig5.5 KB
assets/blueprints/components/counter.yamlconfig6.6 KB
assets/blueprints/components/data-tables.yamlconfig6.0 KB
assets/blueprints/components/datepickers.yamlconfig6.1 KB
assets/blueprints/components/datetime-picker.yamlconfig7.4 KB
assets/blueprints/components/docked-composer.yamlconfig13.3 KB
assets/blueprints/components/docked-form-footer.yamlconfig6.1 KB
assets/blueprints/components/docked-utility-bar.yamlconfig10.9 KB
assets/blueprints/components/drop-zone.yamlconfig4.5 KB
assets/blueprints/components/dueling-picklist.yamlconfig8.8 KB
assets/blueprints/components/dynamic-icons.yamlconfig5.0 KB
assets/blueprints/components/dynamic-menu.yamlconfig7.7 KB
assets/blueprints/components/expandable-section.yamlconfig4.6 KB
assets/blueprints/components/expression.yamlconfig7.3 KB
assets/blueprints/components/feeds.yamlconfig5.7 KB
assets/blueprints/components/file-selector.yamlconfig6.8 KB
assets/blueprints/components/files.yamlconfig4.8 KB
assets/blueprints/components/form-element.yamlconfig6.1 KB
assets/blueprints/components/global-header.yamlconfig4.7 KB
assets/blueprints/components/global-navigation.yamlconfig4.3 KB
assets/blueprints/components/icons.yamlconfig5.1 KB
assets/blueprints/components/illustration.yamlconfig8.5 KB
assets/blueprints/components/input.yamlconfig5.4 KB
assets/blueprints/components/list-builder.yamlconfig6.2 KB
assets/blueprints/components/lookups.yamlconfig5.8 KB
assets/blueprints/components/map.yamlconfig5.0 KB
assets/blueprints/components/menus.yamlconfig5.5 KB
assets/blueprints/components/modals.yamlconfig6.1 KB
assets/blueprints/components/notifications.yamlconfig3.1 KB
assets/blueprints/components/page-headers.yamlconfig6.0 KB
assets/blueprints/components/panels.yamlconfig6.8 KB
assets/blueprints/components/path.yamlconfig6.4 KB
assets/blueprints/components/picklist.yamlconfig5.2 KB
assets/blueprints/components/pills.yamlconfig5.9 KB
assets/blueprints/components/popovers.yamlconfig4.6 KB
assets/blueprints/components/progress-bar.yamlconfig4.4 KB
assets/blueprints/components/progress-indicator.yamlconfig5.6 KB
assets/blueprints/components/progress-ring.yamlconfig4.0 KB
assets/blueprints/components/prompt.yamlconfig5.5 KB
assets/blueprints/components/publishers.yamlconfig7.0 KB
assets/blueprints/components/radio-button-group.yamlconfig7.3 KB
assets/blueprints/components/radio-group.yamlconfig5.0 KB
assets/blueprints/components/rich-text-editor.yamlconfig6.0 KB
assets/blueprints/components/scoped-notifications.yamlconfig7.6 KB
assets/blueprints/components/scoped-tabs.yamlconfig3.7 KB
assets/blueprints/components/select.yamlconfig4.3 KB
assets/blueprints/components/setup-assistant.yamlconfig8.8 KB
assets/blueprints/components/slider.yamlconfig4.2 KB
assets/blueprints/components/spinners.yamlconfig5.4 KB
assets/blueprints/components/split-view.yamlconfig4.4 KB
assets/blueprints/components/summary-detail.yamlconfig4.1 KB
assets/blueprints/components/tabs.yamlconfig6.1 KB
assets/blueprints/components/textarea.yamlconfig4.6 KB
assets/blueprints/components/tiles.yamlconfig4.0 KB
assets/blueprints/components/timepicker.yamlconfig5.1 KB
assets/blueprints/components/toast.yamlconfig6.5 KB
assets/blueprints/components/tooltips.yamlconfig4.1 KB
assets/blueprints/components/tree-grid.yamlconfig4.9 KB
assets/blueprints/components/trees.yamlconfig4.8 KB
assets/blueprints/components/trial-bar.yamlconfig4.2 KB
assets/blueprints/components/vertical-navigation.yamlconfig5.2 KB
assets/blueprints/components/vertical-tabs.yamlconfig6.9 KB
assets/blueprints/components/visual-picker.yamlconfig6.8 KB
assets/blueprints/components/welcome-mat.yamlconfig5.5 KB
assets/hooks-index.jsonconfig141.1 KB
assets/icon-metadata.jsonconfig919.3 KB
assets/utilities-index.jsonconfig508.6 KB
references/README.mdmarkdown5.8 KB
references/blueprints-index.mdmarkdown9.0 KB
references/checklists.mdmarkdown3.8 KB
references/component-selection.mdmarkdown3.7 KB
references/examples.mdmarkdown8.1 KB
references/icons-decision-guide.mdmarkdown3.8 KB
references/icons-guidance.mdmarkdown6.2 KB
references/overviews/borders.mdmarkdown11.0 KB
references/overviews/color.mdmarkdown12.0 KB
references/overviews/display-density.mdmarkdown18.7 KB
references/overviews/icons.mdmarkdown9.3 KB
references/overviews/illustrations.mdmarkdown10.3 KB
references/overviews/shadows.mdmarkdown7.0 KB
references/overviews/spacing.mdmarkdown9.8 KB
references/overviews/typography.mdmarkdown14.8 KB
references/overviews/utilities.mdmarkdown23.9 KB
references/slds-development-guide.mdmarkdown8.8 KB
references/styling-decision-guide.mdmarkdown9.3 KB
references/styling-hooks/borders.mdmarkdown9.0 KB
references/styling-hooks/color/expressive-palette-hooks.mdmarkdown6.7 KB
references/styling-hooks/color/index.mdmarkdown6.5 KB
references/styling-hooks/color/semantic/accent-hooks.mdmarkdown9.9 KB
references/styling-hooks/color/semantic/feedback-hooks.mdmarkdown33.4 KB
references/styling-hooks/color/semantic/surface-hooks.mdmarkdown17.1 KB
references/styling-hooks/color/system-hooks.mdmarkdown5.8 KB
references/styling-hooks/index.mdmarkdown10.8 KB
references/styling-hooks/shadows.mdmarkdown8.3 KB
references/styling-hooks/spacing.mdmarkdown12.3 KB
references/styling-hooks/typography.mdmarkdown17.8 KB
references/utilities-quick-ref.mdmarkdown3.7 KB
references/utilities/alignment.mdmarkdown3.7 KB
references/utilities/borders.mdmarkdown4.0 KB
references/utilities/box.mdmarkdown4.3 KB
references/utilities/color.mdmarkdown7.7 KB
references/utilities/dark-mode.mdmarkdown3.5 KB
references/utilities/description-list.mdmarkdown5.5 KB
references/utilities/floats.mdmarkdown3.8 KB
references/utilities/grid.mdmarkdown9.7 KB
references/utilities/horizontal-list.mdmarkdown3.7 KB
references/utilities/hyphenation.mdmarkdown2.3 KB
references/utilities/index.mdmarkdown6.6 KB
references/utilities/interactions.mdmarkdown3.1 KB
references/utilities/layout.mdmarkdown3.6 KB
references/utilities/line-clamp.mdmarkdown4.3 KB
references/utilities/margin.mdmarkdown5.2 KB
references/utilities/media-object.mdmarkdown5.3 KB
references/utilities/name-value-list.mdmarkdown4.8 KB
references/utilities/padding.mdmarkdown5.3 KB
references/utilities/position.mdmarkdown5.9 KB
references/utilities/print.mdmarkdown3.0 KB
references/utilities/scrollable.mdmarkdown4.1 KB
references/utilities/sizing.mdmarkdown5.7 KB
references/utilities/themes.mdmarkdown4.0 KB
references/utilities/truncate.mdmarkdown3.7 KB
references/utilities/typography.mdmarkdown4.6 KB
references/utilities/vertical-list.mdmarkdown5.1 KB
references/utilities/visibility.mdmarkdown6.1 KB
scripts/search-blueprints.cjsscript3.6 KB
scripts/search-hooks.cjsscript4.4 KB
scripts/search-icons.cjsscript6.1 KB
scripts/search-utilities.cjsscript5.3 KB

references/utilities/sizing.md

View on GitHub
---
id: slds.guidance.utilities.sizing
title: Sizing Utilities
description: SLDS width sizing utility classes for responsive layouts
summary: "Utilities for width sizing. Fractional widths (1-of-2 through 1-of-12), absolute sizes, responsive breakpoints, and flex ordering."

artifact_type: reference
domain: utilities
topic: sizing

content_format: structured
complexity: intermediate
audience: [implementer]

tasks: [implement]

refs:
  - slds.guidance.utilities
  - slds.guidance.overview.utilities
  - slds.guidance.utilities.grid

tags: [utilities, sizing, width, responsive, fractional]
keywords: [slds-size, slds-order, fractional width, responsive sizing]
---

# Sizing - Width Control

Width sizing and flex ordering.

## Core Classes

### Fractional Widths

Based on 12-column grid system with denominators of 2, 3, 4, 5, 6, 7, 8, and 12.

| Class | Purpose |
|-------|---------|
| `slds-size_1-of-2` | Sets width to 50% |
| `slds-size_1-of-3` | Sets width to 33.333% |
| `slds-size_2-of-3` | Sets width to 66.6667% |
| `slds-size_1-of-4` | Sets width to 25% |
| `slds-size_3-of-4` | Sets width to 75% |
| `slds-size_1-of-5` | Sets width to 20% |
| `slds-size_2-of-5` | Sets width to 40% |
| `slds-size_3-of-5` | Sets width to 60% |
| `slds-size_4-of-5` | Sets width to 80% |
| `slds-size_1-of-6` | Sets width to 16.6667% |
| `slds-size_5-of-6` | Sets width to 83.3333% |
| `slds-size_1-of-7` | Sets width to 14.2857% |
| `slds-size_1-of-8` | Sets width to 12.5% |
| `slds-size_1-of-12` | Sets width to 8.3333% |
| `slds-size_5-of-12` | Sets width to 41.6667% |
| `slds-size_7-of-12` | Sets width to 58.3333% |
| `slds-size_11-of-12` | Sets width to 91.6667% |

### Absolute Sizes

Fixed widths in rem units.

| Class | Purpose |
|-------|---------|
| `slds-size_xxx-small` | Sets width to 3rem (48px) |
| `slds-size_xx-small` | Sets width to 6rem (96px) |
| `slds-size_x-small` | Sets width to 12rem (192px) |
| `slds-size_small` | Sets width to 15rem (240px) |
| `slds-size_medium` | Sets width to 20rem (320px) |
| `slds-size_large` | Sets width to 25rem (400px) |
| `slds-size_x-large` | Sets width to 40rem (640px) |
| `slds-size_xx-large` | Sets width to 60rem (960px) |
| `slds-size_full` | Sets width to 100% |

### Responsive Breakpoints

Breakpoint-specific sizing with mobile-first approach.

| Breakpoint | Viewport Width | Prefix |
|------------|---------------|--------|
| x-small | ≥ 320px (20em) | `slds-x-small-size_*` |
| small | ≥ 480px (30em) | `slds-small-size_*` |
| medium | ≥ 768px (48em) | `slds-medium-size_*` |
| large | ≥ 1024px (64em) | `slds-large-size_*` |
| x-large | ≥ 1280px (80em) | `slds-x-large-size_*` |
| max-small | < 480px (30em) | `slds-max-small-size_*` |
| max-medium | < 768px (48em) | `slds-max-medium-size_*` |
| max-large | < 1024px (64em) | `slds-max-large-size_*` |

### Flex Ordering

Controls visual order in flexbox layouts.

| Class | Purpose |
|-------|---------|
| `slds-order_1` | Sets flex order to 1 |
| `slds-order_2` | Sets flex order to 2 |
| `slds-order_3` | Sets flex order to 3 |
| `slds-order_4` | Sets flex order to 4 |
| `slds-order_5` | Sets flex order to 5 |
| `slds-order_6` through `slds-order_12` | Sets flex order 6-12 |

## Common Patterns

### Three-Column Layout
```html
<!-- Three equal columns -->
<div class="slds-grid slds-wrap">
  <div class="slds-size_1-of-3">
    <!-- Column 1: 33.333% width -->
  </div>
  <div class="slds-size_1-of-3">
    <!-- Column 2: 33.333% width -->
  </div>
  <div class="slds-size_1-of-3">
    <!-- Column 3: 33.333% width -->
  </div>
</div>
```

### Responsive Grid
```html
<!-- Full width mobile, half tablet, quarter desktop -->
<div class="slds-grid slds-wrap">
  <div class="slds-size_1-of-1 slds-medium-size_1-of-2 slds-large-size_1-of-4">
    <!-- Card adapts from 100% → 50% → 25% -->
  </div>
  <div class="slds-size_1-of-1 slds-medium-size_1-of-2 slds-large-size_1-of-4">
    <!-- Card adapts from 100% → 50% → 25% -->
  </div>
</div>
```

### Sidebar Layout
```html
<!-- Fixed sidebar with flexible content -->
<div class="slds-grid">
  <nav class="slds-size_medium">
    <!-- Sidebar: 320px fixed width -->
  </nav>
  <main class="slds-col">
    <!-- Content: Fills remaining space -->
  </main>
</div>
```

### Reordered Content
```html
<!-- Visual order differs from DOM order -->
<div class="slds-grid">
  <div class="slds-size_1-of-3 slds-order_3">
    <!-- Appears third visually -->
  </div>
  <div class="slds-size_1-of-3 slds-order_1">
    <!-- Appears first visually -->
  </div>
  <div class="slds-size_1-of-3 slds-order_2">
    <!-- Appears second visually -->
  </div>
</div>
```

### Form Layout
```html
<!-- Two-column form with responsive stacking -->
<div class="slds-form" role="form">
  <div class="slds-grid slds-wrap slds-gutters">
    <div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-2">
      <!-- First Name field: Full width mobile, half desktop -->
    </div>
    <div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-2">
      <!-- Last Name field: Full width mobile, half desktop -->
    </div>
    <div class="slds-col slds-size_1-of-1">
      <!-- Email field: Always full width -->
    </div>
  </div>
</div>
```

## Best Practices

✅ Use fractional widths for flexible grid layouts
✅ Apply responsive classes for mobile-first design
✅ Combine with `slds-grid` and `slds-wrap` for proper grid behavior
✅ Use `slds-col` for flexible remaining space
✅ Apply `slds-gutters` to parent grid for consistent spacing
✅ Use semantic HTML elements with sizing utilities

❌ Avoid mixing fractional and absolute sizes on siblings
❌ Never use sizing utilities without proper grid container
❌ Avoid using more than 12 total columns per row
❌ Never rely solely on `slds-order_*` for accessibility - maintain logical DOM order
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: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall