View Source LayoutBuilder (layout_builder v0.3.5)

LayoutBuilder allows you to create a %Layout.Layout{} containing %Layout.Row{} and %Layout.Row{}.

Link to this section Summary

Link to this section Functions

Link to this function

handle_event(binary, arg2, socket)

View Source
@spec handle_event(String.t(), map(), Phoenix.LiveView.Socket.t()) ::
  {:noreply, Phoenix.LiveView.Socket.t()}

Callback implementation for Phoenix.LiveComponent.handle_event/3.

LayoutBuilder component

examples

Examples

<.layout_builder />

attributes

Attributes

  • title (:string) - <hx> title level. Defaults to "h2".
  • title_class (:string) - classes to add to <hx>. Defaults to "".
  • class (:string) - classes to pass to layout builder. Defaults to "".
  • row_class (:string) - classes to pass to layout builder. Defaults to "flex".
  • edit_layout (:boolean) - show buttons to add / remove cols and rows from layout builder and show background colors. Defaults to true.
  • layout (LayoutBuilder.Layout.Layout) (required) - layout built.Examples include and %LayoutBuilder.Layout.Layout{id: nil, name: nil, rows: []}.

slots

Slots

  • content - Content to show inside each col. Accepts attributes:
    • class (:string) - Custom classes to add.