Function components used internally by Slab.
These are public so applications can reuse the same table primitives for
hand-rolled tables that need to match the Slab look.
Summary
Functions
Renders a styled checkbox input.
Renders a scrollable <pre><code> block for large values like maps.
Renders one of the SVG icons used by the data table.
Renders a <table> element wrapped in a horizontally-scrollable container.
Renders a <td> element.
Renders a <th> element.
Renders a <tr> element.
Functions
@spec checkbox(map()) :: Phoenix.LiveView.Rendered.t()
Renders a styled checkbox input.
Attributes
name(:string) (required)checked(:boolean) - Defaults tofalse.- Global attributes are accepted.
@spec codeblock(map()) :: Phoenix.LiveView.Rendered.t()
Renders a scrollable <pre><code> block for large values like maps.
Attributes
value(:any) (required)
@spec icon(map()) :: Phoenix.LiveView.Rendered.t()
Renders one of the SVG icons used by the data table.
Supported types
"check-circle-outline""x-circle-outline""chevron-up-outline""chevron-down-outline""chevron-left-outline""chevron-right-outline""funnel-outline""bookmark-outline""clipboard-outline""view-columns-outline"
Attributes
type(:string) (required)class(:any) - Defaults to"h-6 w-6 flex-shrink-0 text-gray-400".
@spec table(map()) :: Phoenix.LiveView.Rendered.t()
Renders a <table> element wrapped in a horizontally-scrollable container.
Slots
:thead- optional table header content:inner_block- table body rows
Slots
theadinner_block(required)
@spec td(map()) :: Phoenix.LiveView.Rendered.t()
Renders a <td> element.
Slots
inner_block(required)
@spec th(map()) :: Phoenix.LiveView.Rendered.t()
Renders a <th> element.
Slots
inner_block(required)
@spec tr(map()) :: Phoenix.LiveView.Rendered.t()
Renders a <tr> element.
Slots
inner_block(required)