Formatting output data using Lightning base components

The Lightning base components for formatting allow us to format emails, addresses, dates, URLs, and much more.

The following screenshot from the component library shows various format options:

The following component demonstrates a working example of how to use these components. Note that we also use some of the base input components for the addresses and names input:

<aura:application extends="force:slds">  <aura:attribute name="street" type="string"/> <aura:attribute name="city" type="string"/> <aura:attribute name="country" type="string"/> <aura:attribute name="province" type="string"/> ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.