Skip to content
Data displayGenerated from the public API

DataTableSelectionCount

The row above a table: search, facets, column visibility and the selection count.

@luc/ui/data-table

Examples

Default

Shown inside a real table, which is the only context the component renders in.

Six prepared research runs with performance and metadata columns.
Equity
BTC-USDVolatility carryPausedRange2.0041.7%-29.1%34156.7%Sep 13
AAPLCross-sectional momentumLiveStress1.73-3.8%-32.4%39440.2%Aug 24
NDXVolatility carryLiveStress1.5523.0%-26.0%42345.5%Sep 9
NVDAMean reversionPausedStress1.32-2.0%-15.0%53293.3%Aug 19
NDXMean reversionFailedTrend0.4825.4%-13.7%29759.9%Sep 9
MSFTTrend breakoutFailedRange0.339.4%-26.8%22323.3%Sep 21

Usage

import { DataTableSelectionCount } from "@luc/ui/data-table";
<DataTable
  columns={columns}
  data={runs}
  ariaLabel="Research runs"
  toolbar={
    <DataTableToolbar
      search={{ label: "Search runs", placeholder: "Search runs…" }}
      actions={<DataTableSelectionCount label="selected" />}
    />
  }
/>

Package setup — peer requirements, the stylesheet and the provider — is on installation.

API

Read from the published TypeScript API, so a prop that is not listed here does not exist and a default that is listed is the one the compiler sees.

Exported symbols
ExportKindSignature
DataTableSelectionCount2 documented props({ className, label }: DataTableSelectionCountProps) => import("@types/react").JSX.Element | null
DataTableToolbar4 documented props({ className, children, search, actions }: DataTableToolbarProps) => import("@types/react").JSX.Element

DataTableSelectionCount props

Type: DataTableSelectionCountProps

Values the compiler reads from the declaration.

DataTableSelectionCount props
PropTypeDefaultNotes
className?string | undefined—
label?string | undefined—Noun for the selected rows. Default `"selected"`.

DataTableToolbar props

Type: DataTableToolbarProps

Values the compiler reads from the declaration.

DataTableToolbar props
PropTypeDefaultNotes
actions?ReactNode—Right-aligned controls: column visibility, export, density, actions.
children?ReactNode—Left-of-search controls (facets, view switches).
className?string | undefined—
search?boolean | { placeholder?: string; label?: string; className?: string; } | undefined—Bound global search field. `true` uses the defaults.

Guidelines

Do

  • Use `search` rather than a separate input, so the table's global filter and the field share one value.
  • Put the selection count in `actions`: it is feedback about the table, not a command.

Don't

  • Add a second search field for the same table; two boxes filtering one dataset disagree the moment either is typed in.

Accessibility

The search field is a labelled input (`search.label` is the accessible name), and the selection count is live text inside the toolbar rather than a second control.

Family

Data display

Dense, sortable, scannable: the surfaces a real product reads numbers from.

17 documented entries in this family. Open the family index

Luc UI v1.0DataTableSelectionCountdark theme