VVibeFlui

Columns

Columns are configured with table.columns.

String columns

TS
table: {
  columns: ["name", "email", "status"]
}

String columns are normalized into objects. VibeFlui derives the label and infers the column type from the key.

Object columns

TS
table: {
  columns: [
    { key: "user.profile.fullName", label: "Name", sortable: true, searchable: true },
    { key: "email", label: "Email", type: "email", searchable: true },
    { key: "status", label: "Status", type: "custom", renderer: "StatusBadge" }
  ]
}

Column properties

PropertyTypePurpose
keystringRow value path and TanStack column id.
labelstringHeader text. Defaults from key.
typecolumn typeDisplay hint. Defaults by inference.
widthstring | numberColumn width for fixed table layout.
sortablebooleanEnables header sorting.
searchablebooleanIncludes the column in global search.
filterablebooleanMetadata flag for filterable columns.
hiddenbooleanHides the column from rendering.
visibleWhenconditionSchema-level column visibility condition. It is not evaluated per row.
rendererstringRegistry renderer key.
computedstringRegistry computed resolver key.
computestringAlias used by runtime for computed resolver lookup.
classNamestringSchema metadata for integrations. The core table renderer does not apply it to cells or headers.
headerClassNamestringHeader cell (<th>) class hook applied by the core table renderer.
cellClassNamestringData cell (<td>) class hook applied by the core table renderer, merged with the tableCell theme slot.
classNameWhencondition class rulesSchema metadata for integrations. Use theme class name resolvers for active conditional row/cell styling.

Runtime notes

Column visibleWhen is evaluated as column-level visibility, not row-level visibility. Use a custom renderer when a single cell needs conditional content.

The core table renderer applies headerClassName (to <th>) and cellClassName (to <td>, merged with the tableCell theme slot). Plain className and classNameWhen at the column level are accepted by the schema, but they are metadata for integrations unless an adapter or custom renderer uses them.

Use headerClassName/cellClassName for per-column styling such as text alignment:

TS
{ key: "total", label: "Total", headerClassName: "text-right", cellClassName: "text-right" }

headerClassName merges directly with the header cell's base class — unlike cellClassName, it does not merge with a theme class name slot or react to classNameWhen/classNameResolver, since there is no dedicated header-cell theme slot.

Column types

Supported table column types:

  • text
  • number
  • date
  • datetime
  • boolean
  • badge
  • email
  • custom
  • computed

Computed column

TS
export const ordersSchema = {
  resource: "orders",
  table: {
    columns: [
      { key: "total", label: "Total", type: "computed", computed: "orders.formatTotal" }
    ]
  },
  registry: {
    computedResolvers: ["orders.formatTotal"]
  }
} as const;
TS
import { createRegistry } from "@vibeflui/core";

export const registry = createRegistry({
  computedResolvers: {
    "orders.formatTotal": ({ row }) => {
      const amount = Number(row.total ?? 0);
      return new Intl.NumberFormat("en", { style: "currency", currency: "USD" }).format(amount);
    }
  }
});

Custom renderer

TS
table: {
  columns: [
    { key: "status", label: "Status", type: "custom", renderer: "StatusBadge" }
  ]
},
registry: {
  renderers: ["StatusBadge"]
}