Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Lightning Types entry
How-to guide

How to create a custom Lightning Type

Creating a custom Lightning Type means authoring a LightningTypeBundle and deploying it as metadata. You build the JSON files locally, map any custom editor or renderer Lightning Web Components, then deploy through Salesforce CLI or Metadata API. These are the core pieces every bundle needs.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated Jun 16, 2026

Creating a custom Lightning Type means authoring a LightningTypeBundle and deploying it as metadata. You build the JSON files locally, map any custom editor or renderer Lightning Web Components, then deploy through Salesforce CLI or Metadata API. These are the core pieces every bundle needs.

  1. Create the bundle folder

    Under your project's force-app metadata, add a lightningTypes folder, then a subfolder named after your type. This subfolder is the bundle for that one Lightning Type.

  2. Author schema.json

    Write a schema.json that describes the data shape and its validation rules using JSON Schema. This file is required. Reference custom labels with {!$Label.c.LabelName} so titles and messages stay translatable.

  3. Add channel folders with editor and renderer

    Inside the type folder, add channel folders such as experienceBuilder or lightningDesktopGenAi. Place an editor.json to map your input LWC and, where supported, a renderer.json to map your output LWC.

  4. Deploy and wire it up

    Deploy the bundle with Salesforce CLI or Metadata API. Then reference the type from the consuming surface, such as the js-meta.xml of a component or the display setting of an Agentforce action.

Mandatory fields
lightningTypes folderrequired

The top-level container folder that holds every custom Lightning Type bundle in your project.

Type subfolderrequired

A folder named after the type. Its name is how components and actions reference the type.

schema.jsonrequired

Required. Defines the data structure and validation rules in JSON Schema. A bundle is not valid without it.

editor.json (per channel)required

Optional. Maps a custom Lightning Web Component as the input editor for a given channel folder.

renderer.json (per channel)required

Optional. Maps a custom Lightning Web Component as the output renderer. Not supported in the Experience Builder channel.

Gotchas
  • Renderer overrides do not work in the Experience Builder channel, so plan for custom input but default output there.
  • LightningTypeBundle needs API version 64.0 or later. Confirm your org and project source API version support it.
  • Check the Lightning Types Reference for a standard type before building a custom one. You may not need a bundle at all.
  • Channel folder names are specific (for example lightningDesktopGenAi, enhancedWebChat). A typo means the override is silently ignored.

See the full Lightning Types entry

Lightning Types includes the definition, worked example, deep dive, related terms, and a quiz.