Label

Defines a label


Provides similar capabilities to Phoenix's built-in label/2 function.

Option class can be set directly and will override anything in opts.

All given options are forwarded to the underlying tag. A default value is provided for for attribute but can be overridden if you pass a value to the for option. Text content would be inferred from field if not specified.


      
<Field name="name">
  <Label>First name</Label>
  <TextInput/>
</Field>
    

# Public API

Name Description Type Values Default
values List values that will be sent as part of the payload triggered by an event.

:keyword []
form The form identifier.

:form
field The field name.

:any
class The CSS class for the underlying tag.

:css_class
text The text for the generated <label> element, if no content (default slot) is provided.

:any
opts Options list.

:keyword []