Row Selection

Row selection checkbox for data tables with checked and indeterminate states and a default Select row label. Pairs with a header checkbox for select all.

src/registry/ui/row-selection.tsx/r/row-selection.json

Installation#

bash
npx shadcn@latest add @minidev/row-selection

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/row-selection.json

Usage#

tsx
import { RowSelection } from "@/components/ui/row-selection"

export function Example() {
  return <RowSelection />
}

API reference#

RowSelection props
PropTypeDefault
checkedboolean-
indeterminateboolean-
onCheckedChange(v: boolean) => void-
aria-labelstring-

Dependencies#

npm

React only

Built from

All data table components

Learn more