Skip to main content
Lightning App Builder allows administrators to build custom pages by dragging and dropping components. By exposing your Lightning Web Components in App Builder, you can make them configurable without requiring code changes.

Overview

To make a component available in Lightning App Builder, you need to:
  1. Mark the component as exposed in the metadata file
  2. Specify target contexts (App Page, Home Page, Record Page, etc.)
  3. Define configurable properties using @api
  4. Configure property types and options in the metadata

Basic Configuration

Component with @api Properties

compositionWithAppBuilder.js
compositionWithAppBuilder.html

Metadata Configuration

compositionWithAppBuilder.js-meta.xml

Metadata Elements

Required Elements

1

Set isExposed to true

This makes the component visible in App Builder’s component palette
2

Define targets

Specify where the component can be used
3

Configure properties

Define which properties are configurable and their input types

Available Targets

Property Types

App Builder supports various property types for configuration:

String

Simple text input:

String with Picklist

Dropdown selection using datasource:

Integer

Numeric input with optional min/max constraints:

Boolean

Checkbox input:

Additional Types

Property Attributes

Common Attributes

Type-Specific Attributes

String with datasource:
Integer with constraints:

Using Component Properties

Once configured in App Builder, the property values are automatically passed to your component:

Best Practices

1

Provide sensible defaults

Always set default values so the component works out-of-the-box
2

Use clear labels and descriptions

Help administrators understand what each property does
3

Validate property values

Don’t assume properties will always be valid
4

Group related properties

Use consistent naming and organize properties logically

Testing in App Builder

1

Deploy your component

Push the component and metadata to your org
2

Open Lightning App Builder

Navigate to Setup > Lightning App Builder
3

Create or edit a page

Choose the appropriate page type matching your target configuration
4

Find your component

Look for your component in the Custom components section
5

Drag and configure

Drag the component onto the page and test the property inputs
6

Save and activate

Save your page and activate it for users

Advanced: Object and Record Context

For Record Pages, you can access the current record’s context:
When using lightning__RecordPage, the recordId and objectApiName properties are automatically provided by the framework.

Next Steps

Composition Overview

Review component composition fundamentals

Wire Service

Learn how to fetch and display Salesforce data