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 →