ZoonkWeb.Components.Form (Zoonk v0.1.0-dev)

View Source

Provides the UI for rendering a simple form.

Summary

Functions

Renders a form as a container.

Functions

form_container(assigns)

Renders a form as a container.

Attributes

  • for (:any) (required) - the data structure for the form.
  • as (:any) - the server side parameter to collect all input under. Defaults to nil.
  • label (:string) - the aria-label for the form. Defaults to nil.
  • class (:any) - the CSS class to apply to the form. Defaults to nil.
  • Global attributes are accepted. the arbitrary HTML attributes to apply to the form tag. Supports all globals plus: ["autocomplete", "name", "rel", "action", "enctype", "method", "novalidate", "target", "multipart"].

Slots

  • inner_block (required)
  • title - the slot for the form title.
  • subtitle - the slot for the form subtitle.