finds.dev

trailheadapps/lwc-recipes

A collection of easy-to-digest code examples for Lightning Web Components on Salesforce Platform

View on GitHubHomepage ↗

★ 2,858JavaScriptCC0-1.0updated Jun 2026

// the take

Official Salesforce sample app with ~70 self-contained LWC components demonstrating specific framework patterns — wire adapters, Apex integration, LMS, GraphQL, third-party libs, etc. Each component is a minimal working example with Jest tests included. Purely educational; not a library you install, a codebase you read and copy from.

Each recipe isolates exactly one concept with the minimum code needed — no noise, no wrapper abstractions making you hunt for what matters. Jest tests ship alongside every component, so you can see how Salesforce's @lwc/jest mocking actually works in practice rather than guessing. The component breadth is genuinely wide: GraphQL wire adapter, Light DOM, State Managers, LMS pub/sub across Aura and LWC — these are topics with thin documentation elsewhere. CI with packaging validation means the examples actually deploy; this isn't dead sample code.

Hard Salesforce Platform dependency — nothing here runs outside a scratch org or Developer Edition, so if you're evaluating LWC for open-source use (lwc.dev), this repo teaches you patterns that won't transfer. The recipes stop at the component boundary: there's no example of composing several of these patterns into a real feature, so the jump from recipe to production code is still on you. Test coverage is shallow — tests mostly verify rendering, not behavior or error paths. No recipes for newer platform features like offline-capable LWCs or Experience Cloud contexts, which matters if that's where your work is.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,858
Forks
3,242
Language
JavaScript
License
CC0-1.0
Last commit
3 Jun 2026

// nearby

If lwc-recipes isn't quite it.

All repos →