V Vaylan UI
Data display

Table

Render responsive tabular data from row and column slots.

Preview

Display-only component. It does not own an interaction model.

Team members
NameRoleStatus
Ada Lovelace Admin Ready
Grace Hopper Editor Invited

Example

<.table rows={@users} caption="Users"><:col :let={user} label="Name"><%= user.name %></:col></.table>

API contract

table/1 uses declared Phoenix attributes and slots. This table is generated from the compiled component metadata.

AttributeTypeRequiredDefault Accepted values
id :string No nil Any value matching the declared type
rows :list Yes — Any value matching the declared type
row_id :any No nil Any value matching the declared type
size :atom No :md [:xs, :sm, :md, :lg, :xl]
zebra :boolean No false Any value matching the declared type
caption :string No nil Any value matching the declared type
class :any No nil Any value matching the declared type
rest :global No — Any value matching the declared type
SlotRequiredSlot attributes
col Yes label: :string required, class: :any
action No label: :string

States and behavior

The responsive wrapper preserves tabular semantics and accepts a screen-reader caption.

Keyboard and accessibility

Behavioral tests

These automated checks are applied to this component by the package and documentation test suites.

  • ExUnit

    Responsive table semantics

    Preserves table markup, caption, row and column content inside the responsive overflow wrapper.

    test/vaylan_ui/components_test.exs
  • Docs

    Preview behavior contract

    Classified as display. Display-only component. It does not own an interaction model.

    examples/docs/test/vaylan_ui_docs_web/controllers/page_controller_test.exs
  • Docs

    Stable public component page

    Renders the component name, example, API contract, accepted values, and keyboard and accessibility guidance at its stable URL.

    examples/docs/test/vaylan_ui_docs_web/controllers/page_controller_test.exs