New and Changed Lightning Components

Build user interfaces quickly with a bevy of new components.

New Components

These components are new and require API version 44.0 and later.

lightning:empApi
Embed the lightning:empApi component in your custom Lightning component to subscribe to a streaming event channel and receive event notifications. You can subscribe to any type of event channel on the Lightning Platform, including channels for platform events, PushTopic and generic events, and Change Data Capture (Developer Preview) events. The lightning:empApi component uses a shared CometD-based Streaming API connection, enabling you to run multiple streaming apps in the browser.
lightning:map
The lightning:map component securely displays a map of one or more locations using Google Maps. You can pass markers to the component to define the locations to map. A marker can be a coordinate pair of latitude and longitude, or a set of address elements: City, Country, PostalCode, State, and Street.

Here’s the map component with one address.

Screenshot of the lightning:map component

When you specify multiple locations, the map component creates clickable tiles for each location. You can specify a title to display above the list of addresses. You can also show a footer with an “Open in Google Maps” link and specify an initial zoom level for the map.

See https://lightningdesignsystem.com/components/map/ for more map images.

lightning:menuDivider

This component is used as a child component of lightning:buttonMenu. Use lightning:menuDivider to create a dividing line after a menu item. By default, space is added above and below the divider. Use variant="compact" with lightning:menuDivider to reduce the space.

Screenshot of a button menu with a divider
lightning:menuSubheader

This component is used as a child component of lightning:buttonMenu. Use lightning:menuSubheader to create subheadings in the list of menu items. Specify the text of the heading using the label attribute.

Screenshot of menu with subheadings

Changed Components

These components have changed.

lightning:accordion
These attributes are new.
  • allowMultipleSectionsOpen—Indicates that the user can open multiple sections of the accordion at the same time. By default, only one accordion section is expanded at a time.
  • onsectiontoggle—Specifies a handler for the event that’s fired when the open sections change. The event passes an array of all open sections in the accordion.
lightning:buttonMenu
These attributes are new.
  • isLoading—Enables you to show a spinner activity indicator while the menu is loading.
  • loadingStateAlternativeText—Specifies required explanatory text, such as "Loading menu...", to display when isLoading is true.
  • isDraft—Specifies that the button menu is in an unsaved state, and displays an asterisk as an indicator next to the button. You can use the button menu draft state to show that there is an unsaved change that could be lost, such as a user change in a customizable menu.
  • draftAlternativeText—Specifies text describing why the menu is considered in a draft state, and is required when isDraft is true.
The lightning:buttonMenu component supports two new child components.
  • lightning:menuDivider
  • lightning:menuSubheader
lightning:datatable
This value for the type column property is new.
  • button-icon—Displays an icon-only button element that executes an action.
This attribute for the url type column property is new.
  • tooltip—Displays a tooltip for a URL in the datatable column. Use the typeAttributes property to pass the tooltip for the URL.
This attribute for the cellAttributes table column property is new.
  • iconAlternativeText—Descriptive text for an icon that is displayed in a data column.
lightning:formattedRichText
This attribute is new.
  • disableLinkify—Prevents the component from creating links automatically for linkable text in the formatted output.
lightning:fileCard
These attributes are new.
  • hideDescription—Controls display of the file description caption on the file card. If true, nothing displays in the caption. If false, displays file description in the caption.
  • Description—Description of the file. Displays the file name by default.
lightning:helptext
This attribute is new.
  • iconVariant—Enables you to change the style of the helptext icon to one of the following: inverse, warning, or error.

The helptext popover behavior on iOS devices has changed. It opens when you tap the icon, and closes with a second tap on the popover or icon.

lightning:inputField

The lightning:inputField component now supports the geolocation field type. It displays input fields for entering latitude and longitude in decimal degrees.

lightning:isUrlAddressable
URLs for components using lightning:isUrlAddressable are now case-sensitive.
lightning:listView
This attribute is new.
  • showSearchBar—Specifies whether the search bar displays. This value defaults to false. The server side can still disable search if it does not support searching.
lightning:menuItem
These attributes are new.
  • prefixIconName—Adds the specified utility icon before the text of the menu item.
  • href—Creates a link for the menu item, which enables you to use the button menu for navigation. The link is applied to the content of the menu item, including text and icons.
  • isDraft—Specifies that the menu item is in an unsaved state, and displays an asterisk as an indicator next to the item. You can use the menu item draft state to show that there is an unsaved change that could be lost, such as a user change in a customizable menu.
  • draftAlternativeText—Specifies text describing why the menu item is considered in a draft state, which is required when isDraft is true.
lightning:navigation
URLs for components using lightning:navigation are now case-sensitive.
lightning:quickActionAPI
These methods are new.
  • getAvailableActions—Get a list of the available actions on a record page.
  • getAvailableActionFields—Get a list of the available fields for a specific action on a record page.
lightning:nextBestActions (Pilot)
This component executes a strategy, and displays the resulting propositions. The singleColumn attribute is now ignored.
Note

Note

We provide Einstein Next Best Action to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. Einstein Next Best Action isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for Einstein Next Best Action in the IdeaExchange.

lightning:tab

The label attribute now supports text only. Previously the label supported a component type, and you could include, for example, an icon in the tab’s label. If you use a component in a lighting:tab label now, only the text portion of the label value displays. Any CSS classes that are applied are ignored.