RaxolWeb.CoreComponents (Raxol v0.2.0)

View Source

Provides core UI components for the Raxol web interface.

Summary

Functions

Renders a button with the given text and options.

Renders a flash message.

Renders a form group with a label and input.

Renders a form input with the given type and options.

Renders a label for a form input.

Functions

button(assigns)

Renders a button with the given text and options.

Attributes

  • type (:string) - Defaults to "button".
  • class (:string) - Defaults to nil.
  • disabled (:boolean) - Defaults to false.
  • Global attributes are accepted. Supports all globals plus: ["form", "name", "value"].

Slots

  • inner_block (required)

flash(assigns)

Renders a flash message.

Attributes

  • kind (:string) (required)
  • title (:string) - Defaults to nil.
  • Global attributes are accepted. Supports all globals plus: ["phx-click", "phx-value"].

Slots

  • inner_block (required)

form_group(assigns)

Renders a form group with a label and input.

Attributes

  • name (:string) (required)
  • label (:string) (required)
  • type (:string) - Defaults to "text".
  • value (:any)
  • placeholder (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • disabled (:boolean) - Defaults to false.
  • Global attributes are accepted. Supports all globals plus: ["autocomplete", "form", "required"].

input(assigns)

Renders a form input with the given type and options.

Attributes

  • type (:string) - Defaults to "text".
  • name (:string) (required)
  • value (:any)
  • placeholder (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • disabled (:boolean) - Defaults to false.
  • Global attributes are accepted. Supports all globals plus: ["autocomplete", "form", "required"].

label(assigns)

Renders a label for a form input.

Attributes

  • for (:string) (required)
  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)