page Tablecomponent { seo { title = "Table component" description = "Reusable table component." } view {
W WRNexusJS
data component

Table

Reusable table component.

@wrnexus/ui 0.3.46 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<Table
  caption="Data table"
  responsive="true"
  striped="false"
  hoverable="true"
  compact="false"
/>

Legacy mount name: data-component="Table".

Props and attributes

PropTypeRequirementDefault
classstringOptional""
captionstringOptional"Data table"
responsivebooleanOptionaltrue
stripedbooleanOptionalfalse
hoverablebooleanOptionaltrue
compactbooleanOptionalfalse

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/Table.wrn

component Table {
  props {
    class = ""
    caption = "Data table"
    responsive = true
    striped = false
    hoverable = true
    compact = false
  }

  view {
        <div class="wire-table-wrap rounded-2xl border border-[var(--wire-color-border)] bg-[var(--wire-color-surface)] shadow-[var(--wire-shadow-sm)] {class}">
        <table
        class="wire-table min-w-[640px]"
        class:wire-table--striped='{striped}'
        class:wire-table--compact='{compact}'
        class:wire-table--hoverable='{hoverable}'
      >
        <caption class="wire-visually-hidden">{caption}</caption>
        <slot />
        </table>
        </div>
    }
}
} }