Lightning

Master this essential documentation concept

Quick Definition

Salesforce's modern user interface framework that provides a more responsive and visually appealing experience

How Lightning Works

graph TD LX[Lightning Experience] --> LC[Lightning Components] LX --> LA[Lightning App Builder] LX --> LD[Lightning Design System] LC --> LWC[LWC - Lightning Web Components] LC --> AC[Aura Components] LA --> HP[Home Pages] LA --> RP[Record Pages] LA --> AP[App Pages] LD --> CSS[SLDS CSS Framework] LD --> BP[Base Components Library] LWC --> API[Salesforce APIs] LWC --> EV[Lightning Data Service] style LX fill:#0070d2,color:#fff style LWC fill:#1589ee,color:#fff style LD fill:#0070d2,color:#fff

Understanding Lightning

Salesforce's modern user interface framework that provides a more responsive and visually appealing experience

Key Features

  • Centralized information management
  • Improved documentation workflows
  • Better team collaboration
  • Enhanced user experience

Benefits for Documentation Teams

  • Reduces repetitive documentation tasks
  • Improves content consistency
  • Enables better content reuse
  • Streamlines review processes

Lightning UI Training: From Video Demonstrations to Actionable Documentation

When rolling out Salesforce Lightning to your team, video demonstrations are often the first training resource created. These videos showcase Lightning's modern interface components, responsive design elements, and visual customization options in action—something static screenshots can't fully capture.

However, relying solely on video training for Lightning presents challenges. Implementation consultants need to quickly reference specific Lightning features during client configurations. Finding that exact moment where a video explains conditional visibility rules or component hierarchy can waste valuable time. Sales enablement teams similarly struggle when they need to quickly answer a prospect's technical question about Lightning functionality.

By converting your Lightning UI training videos into searchable documentation, you create a resource that addresses these pain points. Your team can instantly locate explanations of Lightning components, find step-by-step instructions for creating custom Lightning pages, or reference best practices for Lightning Experience optimization—all without scrubbing through lengthy videos. This approach is particularly valuable when onboarding new implementation specialists who need to quickly build Lightning expertise.

Real-World Documentation Use Cases

Migrating a Sales Team from Salesforce Classic to Lightning Experience

Problem

Sales reps resist switching from Classic to Lightning because they cannot find familiar features, and managers lack clear documentation showing where Opportunity and Lead workflows have moved or changed in the new UI.

Solution

Lightning's Activity Timeline, Kanban Opportunity board, and Einstein Activity Capture are documented with side-by-side comparisons showing Classic equivalents, helping reps map their existing habits to Lightning workflows.

Implementation

['Audit all Classic Opportunity and Lead page layouts and list every field, button, and related list used daily by the sales team.', "Create a Lightning Experience transition guide using Salesforce's Lightning Experience Transition Assistant to document feature parity and gaps.", 'Build annotated screenshots of Lightning Record Pages highlighting the Activity Timeline, Related Lists panel, and Highlights Panel as replacements for Classic sidebar sections.', "Publish the guide in Salesforce Help & Training and link it from the Lightning App's Help menu using in-app guidance prompts."]

Expected Outcome

Sales team adoption reaches 90% within 30 days, with a 40% reduction in IT support tickets related to 'missing features' after the transition guide is published.

Documenting Custom Lightning Web Components for an Internal AppExchange App

Problem

Developer teams building custom LWC components for internal deployment have no standardized way to document component APIs, events, and slot configurations, causing integration errors when other teams consume the components.

Solution

Lightning Web Components use a declarative metadata structure with .js-meta.xml configuration files and JSDoc annotations that can be parsed to auto-generate component API documentation for internal wikis.

Implementation

['Enforce JSDoc annotations on all @api properties and @track variables in each LWC JavaScript controller, specifying type, default value, and usage context.', 'Use the .js-meta.xml file to define targetConfigs and expose component properties to Lightning App Builder with proper labels and descriptions.', 'Integrate a documentation generator like JSDoc or Storybook into the CI/CD pipeline to auto-publish component documentation on every merge to the main branch.', 'Create a component catalog page in Confluence linking each LWC to its auto-generated API docs, its App Builder configuration options, and a live sandbox demo org.']

Expected Outcome

Cross-team component reuse increases by 60%, and integration bugs caused by incorrect @api property usage drop by 75% within two release cycles.

Creating End-User Training Documentation for a Custom Lightning App in Financial Services

Problem

A financial services firm built a custom Lightning App for loan processing, but end users cannot navigate the multi-tab app structure, dynamic forms built with Flow, and custom LWC dashboards without extensive one-on-one training.

Solution

Lightning's In-App Guidance feature allows admins to embed step-by-step walkthroughs and floating prompts directly on Lightning pages, replacing static PDF manuals with contextual, role-based guidance inside the app itself.

Implementation

['Map the loan processing workflow across Lightning App tabs — Loan Intake, Document Upload, Underwriting Review, and Approval — and identify the top 10 user drop-off points from Salesforce Adoption Dashboards.', 'Build In-App Guidance walkthroughs using Setup > In-App Guidance for each drop-off point, targeting specific Lightning record page components like the Document Checklist LWC and the Approval Flow screen.', 'Supplement In-App Guidance with a Lightning Knowledge article base, tagging articles by loan stage so the Help panel surfaces relevant content contextually.', 'Schedule quarterly review sessions where the training team updates walkthroughs based on new Flow versions or LWC changes tracked in the Salesforce release changelog.']

Expected Outcome

New loan officer onboarding time drops from 3 weeks to 8 days, and errors in the Document Upload stage decrease by 55% in the first quarter after deployment.

Standardizing Lightning Page Layout Documentation Across a Multi-Org Salesforce Environment

Problem

An enterprise with 12 Salesforce orgs across business units has inconsistent Lightning Record Page layouts for the Account object, making it impossible for the central ops team to write universal process documentation without org-specific caveats everywhere.

Solution

Lightning App Builder's page assignment rules and the Salesforce CLI's metadata retrieval for FlexiPage components allow teams to export, compare, and standardize Lightning page configurations across orgs using version-controlled metadata.

Implementation

['Use Salesforce CLI (sf project retrieve start --metadata FlexiPage) to pull all Account Lightning Record Page definitions from each of the 12 orgs into a Git repository.', 'Write a comparison script that diffs FlexiPage XML files to identify which orgs have non-standard components, missing related lists, or different component ordering on the Account record page.', 'Establish a canonical Account Lightning Page template in the central DevOps org and deploy it to all 12 orgs using a Salesforce DX scratch org pipeline with org-specific overrides documented in a decision log.', 'Maintain a living documentation page in Confluence that embeds the canonical FlexiPage XML and lists approved org-specific deviations with business justification for each.']

Expected Outcome

Process documentation word count drops by 30% after eliminating org-specific caveats, and the central ops team can release universal training materials usable across all 12 orgs.

Best Practices

Document Lightning Component API Contracts Before Writing Business Logic

Lightning Web Components expose their interface through @api decorated properties and custom events. Documenting these contracts first — before implementation — ensures that consuming components and admin configurations align with developer intent and prevents breaking changes from going unnoticed.

✓ Do: Define and document all @api properties with their expected data types, accepted values, and default states in JSDoc before writing the component's JavaScript logic, and include the component's fired events in the .js-meta.xml targetConfig.
✗ Don't: Do not write LWC business logic first and retroactively add documentation, as this leads to incomplete API descriptions that omit edge cases and valid input constraints discovered during development.

Use Lightning Design System Tokens as the Reference Standard in UI Documentation

Salesforce Lightning Design System (SLDS) uses design tokens — named variables for colors, spacing, and typography — that are tied to Salesforce's release cycle. Referencing token names instead of hardcoded hex values or pixel measurements in documentation ensures that UI guidelines remain accurate when Salesforce updates its design system.

✓ Do: Reference SLDS token names such as $color-brand-dark or $spacing-medium in component style guides and UI documentation, linking directly to the SLDS token reference at lightningdesignsystem.com.
✗ Don't: Do not document UI specifications using raw CSS values like #0070d2 or 16px, as these become outdated when SLDS tokens are updated in major Salesforce releases and create visual inconsistencies in custom components.

Capture Lightning App Builder Page Assignments Explicitly in Release Notes

Lightning Record Pages can be assigned to specific profiles, apps, or record types using App Builder's assignment rules. These assignments are often invisible to end users but critically affect which page layout a given user sees. Omitting assignment details from release notes causes confusion when different user groups report seeing different page configurations.

✓ Do: Include a Page Assignment Matrix in every release note that lists each Lightning Record Page variant, the profiles or permission sets it targets, the apps it is assigned to, and the record types it applies to.
✗ Don't: Do not document only the component changes on a Lightning page without also documenting its assignment rules, as a perfectly documented page layout is useless if stakeholders do not know which users will actually see it.

Version-Control FlexiPage Metadata Alongside Related LWC Source Code

Lightning page configurations stored as FlexiPage metadata in Salesforce are tightly coupled to the LWC components they host. Storing FlexiPage XML files in the same Git repository and commit history as the LWC source code creates a traceable link between page layout changes and component version changes, making rollbacks and audits straightforward.

✓ Do: Organize your Salesforce DX project so that FlexiPage metadata files for a feature's record pages live in the same feature branch as the LWC components they display, and require both to be reviewed together in pull requests.
✗ Don't: Do not manage FlexiPage configurations exclusively through point-and-click App Builder in production without exporting and committing the metadata, as this creates undocumented configuration drift that cannot be audited or rolled back.

Segment Lightning Documentation by User Persona Using Profile-Based Access Context

Lightning Experience surfaces different features, actions, and page layouts depending on a user's profile, permission sets, and app assignment. Writing a single monolithic user guide for a Lightning App causes confusion because different personas see fundamentally different interfaces. Segmenting documentation by persona — aligned to Salesforce profiles — ensures each user group receives accurate, relevant instructions.

✓ Do: Structure your Lightning user documentation with separate sections or separate documents for each primary Salesforce profile — such as Sales Rep, Sales Manager, and System Administrator — and include profile-specific screenshots taken from a user logged in with that exact profile.
✗ Don't: Do not write Lightning user guides from a System Administrator perspective and present them as universal end-user documentation, as admins see additional page components, action buttons, and setup links that standard users cannot access, making the documentation misleading.

How Docsie Helps with Lightning

Build Better Documentation with Docsie

Join thousands of teams creating outstanding documentation

Start Free Trial