Account Name
Record details here
# Examples Worked examples showing the SLDS authoring workflow: from intent to artifact selection. Each example follows the 5-phase workflow from SKILL.md and shows which files were consulted and why. ## Example 1: Build a Confirmation Dialog ### Phase 1: Understand the Need - **Pattern:** Confirmation dialog before a destructive action - **Framework:** LWC - **States:** Open, confirming (loading), closed ### Phase 2: Select the Artifact **Check LBC:** `LightningModal` exists in the [Lightning Component Library](https://developer.salesforce.com/docs/component-library/overview/components). Use it. **Also search blueprints** (for class reference): ```bash node scripts/search-blueprints.cjs --search "modal" # Found: Modals (category: Overlay, root: slds-modal) ``` **Read blueprint YAML** for class details: `assets/blueprints/components/modals.yaml` Key takeaway: `LightningModal` handles the `slds-modal`, `slds-backdrop`, and ARIA attributes automatically. No need to apply blueprint classes manually in LWC. ### Phase 3: Apply Styling **Read:** `references/styling-decision-guide.md` The destructive action button needs error color to signal danger: ```bash node scripts/search-hooks.cjs --prefix "--slds-g-color-error-" # Found: --slds-g-color-error-1 (#ea001e), --slds-g-color-on-error-1 (#ffffff) ``` **Result:** Use `variant="destructive"` on `lightning-button` inside the modal footer. The LBC handles the correct SLDS color hooks internally. For the modal body spacing, use utility classes: ```html
Are you sure you want to delete this record?
Record details here
{metric.value}
{metric.subtitle}
Check back when data is loaded.