Loading
×Sorry to interrupt
CSS Error
Aura Component

Input Name

  • Represents a name compound field. This component requires API version 42.0 and later.

    Descriptor

    lightning:inputName

    Targets

    Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out / Visualforce, Standalone Lightning App

Example Options

Basic Name Fields

Default Input Name Field

Code

<aura:component> <aura:attribute name="salutationOptions" type="List" default="[ {'label': 'Mr.', 'value': 'Mr.'}, {'label': 'Ms.', 'value': 'Ms.'}, {'label': 'Mrs.', 'value': 'Mrs.'}, {'label': 'Dr.', 'value': 'Dr.'}, {'label': 'Prof.', 'value': 'Prof.'}, ]"/> <div> <lightning:inputName label="Default Input Name Field" firstName="John" middleName="Middleton" lastName="Doe" informalName="Jo" suffix="The 3rd" salutation="Mr." options="{!v.salutationOptions}" /> </div> </aura:component> 
Component
Example
Documentation
Specification