View Source Phoenix.UI.Components.FormGroup (Phoenix UI v0.1.6)

Provides form group component.

Link to this section Summary

Functions

Renders form group component.

Link to this section Functions

Renders form group component.

examples

Examples

<.form_group>
  <.label field={:name} form={f}>
    Name
  </.label>
  <.text_input
    field={:name}
    form={f}
  />
</.form_group>

attributes

Attributes

  • class (:string) - Override the classes applied to the component.
  • element (:string) - The HTML element to use, such as div. Defaults to "div".
  • extend_class (:string) - Extend existing classes applied to the component.
  • invalid (:boolean) - Defaults to false.
  • margin (:string) - If dense or normal, will adjust vertical spacing of this and contained components. Defaults to "normal".
  • rest (:global) - Arbitrary HTML or phx attributes.

slots

Slots

  • inner_block (required)