Skip to content

ChronicStone/nuxt-ui-tools / skills/consumer/table

nuxt-ui-tools-table

Verified

Use this skill when building or debugging table usage with nuxt-ui-tools as a package consumer. Covers defineTableSchema, useTable, DataList, granular composition, columns, filters, sorting, offset or cursor loading, layouts, summary rows on phones, first-use empty states, actions, selection, accessible row names, context, and URL state with concrete examples.

FileKindSize
SKILL.mdskill md3.6 KB
references/actions.mdmarkdown7.7 KB
references/columns.mdmarkdown4.1 KB
references/context.mdmarkdown1.3 KB
references/data-modes.mdmarkdown2.9 KB
references/filters.mdmarkdown17.7 KB
references/getting-started.mdmarkdown1.4 KB
references/groups.mdmarkdown2.1 KB
references/layouts.mdmarkdown6.7 KB
references/overview.mdmarkdown1.2 KB
references/pagination.mdmarkdown2.5 KB
references/patterns.mdmarkdown989 B
references/schema-surface.mdmarkdown1.3 KB
references/selection.mdmarkdown3.3 KB
references/slots.mdmarkdown11.0 KB
references/sorting.mdmarkdown480 B
references/tree.mdmarkdown3.9 KB
references/url-state.mdmarkdown1.6 KB

references/groups.md

View on GitHub
# Table Row Groups

Rows that share a value gather under a header row that folds them. Turn it on with
`table.groupBy`, and with `grid.groupBy` for cards. Each view sets its own; the shape is the same.

## Example

```ts
const groupBy = {
  key: 'family',
  label: ({ value }) => value ?? 'Other',
}

const schema = defineTableSchema({
  tableKey: 'exams',
  rowKey: 'id',
  source: tableSource({ mode: 'remote', query }),
  table: { groupBy, columns },
  grid: { groupBy, renderItem },
})
```

## Options

- `key`: a row field path, or a function for a value the row does not hold as a field
- `label`: the header's text; defaults to the value, or the locale's "Other" for rows with none
- `summary`: shown next to the label; defaults to the number of rows
- `order`: values listed here come first, in this order; the rest follow by value, with numbers
  read as numbers, and empty values last
- `collapsed`: `true`, or a function of the group, to start folded

## What it does on its own

- The whole header row folds the group, and the chevron is its keyboard control.
- With selection on, the table's header row carries a checkbox for the whole group, mixed when only
  some rows are selected. Cards have no checkboxes, so their headers have none either.
- A column sort applies inside each group, and the groups keep their order.
- A shift-click range runs over the rows in the order they show and skips folded groups.
- What the reader folds is remembered per `tableKey`, unless `persistence.preferences` is `false`.

## Limits

- Groups cover the rows that are loaded. A remote source needs a page large enough to hold a whole
  group, otherwise a group splits across pages and its count covers the current page only.
- Grouping is one level. `table.groupBy` is ignored with `table.tree`, which has its own hierarchy.
- Summary rows (`table.summary`) stay flat.

## Outside a table

`UiGroupHeader` is the same header without the table's state, for a grid you build yourself:
`collapsed`, `toggleLabel`, the `toggle` event, and the `leading`, default and `summary` slots.
`--nut-group-toggle` and `--nut-group-gap` line its label up with your rows.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall