Accordion
This starter keeps state local and uses native buttons so keyboard interaction can be layered in cleanly.
View component + code โFree Salesforce Lightning Web Components with starter templates, JavaScript, CSS and Meta XML for common UI patterns.
Preview each pattern, copy the starter code, and adapt it to your project. Components are intentionally small and dependency-light.
This starter keeps state local and uses native buttons so keyboard interaction can be layered in cleanly.
View component + code โUse lightning-datatable for standard behavior, then wrap or extend it only when the UX requires custom rendering.
View component + code โKeep the primary number visually dominant and include a useful label and optional trend context.
View component + code โKeep filtering explicit and debounce server-side search when it triggers expensive Apex queries.
View component + code โFor production, trap focus, restore focus to the triggering element, and close on Escape where appropriate.
View component + code โExpose progress with aria-valuenow and keep the percentage meaningful rather than decorative.
View component + code โAn empty state should explain what happened and give the user a useful next action when one exists.
View component + code โKeep the current step clear and make completed versus upcoming states understandable without color alone.
View component + code โKeep record cards focused on the fields users need to scan and act on quickly.
View component + code โUse toasts for brief feedback that does not require user action to resolve.
View component + code โKeep each event concise and order the timeline consistently so users can scan it quickly.
View component + code โUse Salesforce file permissions and record context deliberately; the UI alone does not determine access.
View component + code โUse lightning-record-picker when its supported behavior fits the project; custom lookup UX should have a clear accessibility plan.
View component + code โKeep navigation data-driven and make the mobile menu state explicit.
View component + code โ