Tree Select Readback

Tree Select Readback is a copy-paste React component that stops whole group ticked, future items included before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/tree-select-readback
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsWhole group ticked, future items included

Was this component page useful?

How do I install Tree Select Readback?

pnpm dlx shadcn@latest add @bollard/tree-select-readback

The files land in your project. They're yours to edit.

How do I use Tree Select Readback in React?

tree-select-readback-usage.tsx
import { TreeSelectReadback, type TreeNode } from "@/components/ui/tree-select-readback"

<TreeSelectReadback
  label="Send the Q3 survey to"
  tree={tree}
  defaultValue={["marketing", "w-Pune", "w-Mumbai", "s-Kochi"]}
  defaultExpanded={["marketing", "sales"]}
/>

What input mistakes does Tree Select Readback catch?

  • Whole-group selections that will include future items
  • Groups partly selected, read back as "3 of 12"
  • Exceptions inside a selected group
  • A pin-to-today option that converts a group rule to today's items

What props does Tree Select Readback accept?

TreeSelectReadback props
PropTypeDefault
label

Legend for the tree.

string"Select"
tree* (required)

The options.

TreeNode[]—
value

Controlled selection: leaf ids, plus parent ids meaning "the whole group, including items added later".

string[]—
defaultValue

Initial selection when uncontrolled.

string[][]
onValueChange

Called with the new selection and the leaf ids it covers today.

(value: string[], leaves: string[]) => void—
defaultExpanded

Parents shown open at first. Defaults to every top-level group.

string[]—
emptyText

Shown when nothing is selected.

string"Nothing selected yet."
futureText

Templates: `{groups}` and `{count}` are filled in.

string"{groups} {verb} ticked as a whole, so anything added lat…
pinLabel

Label of the pin-to-today's-items fix.

string"Only the {count} there now"
newBadge

Badge next to a group ticked as a whole.

string"+ new"

* required. Also accepts the native props of <fieldset> (className, aria-*, data-*…), passed through to it.

How is Tree Select Readback accessible?

  • Expand buttons use aria-expanded/aria-controls and an aria-label
  • Children are a role=group labelled by the parent
  • Checkboxes use <label>s
  • Readback in a polite live region

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Future-items semantics apply only when the group is open (open !== false)
  • Readback wording is English by default; override the text props

What expensive mistakes does Tree Select Readback stop?

Whole group ticked, future items included

Also known as

tree select · nested checkbox · indeterminate · permissions tree · category filter · multi select · folder picker

What dependencies does Tree Select Readback require?

Tree Select Readback facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameTree Select Readback
Registry identifier@bollard/tree-select-readback
Install commandnpx shadcn@latest add @bollard/tree-select-readback
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Tree Select Readback

What form validation mistake does Tree Select Readback catch?

Tree Select Readback prevents whole group ticked, future items included. Reads a nested checkbox selection back in plain words and tells a whole-group tick apart from ticking every item today. Catches: Whole-group selections that will include future items, Groups partly selected, read back as "3 of 12", Exceptions inside a selected group, A pin-to-today option that converts a group rule to today's items. Limitation: validate tree-select-readback schemas on backend.

How do I install tree-select-readback with shadcn?

Run `npx shadcn@latest add @bollard/tree-select-readback`. Sources added: registry/default/tree-select-readback/tree-select-readback.tsx. Package requirements: lucide-react.

What props customize Tree Select Readback?

Tree Select Readback accepts `label`, `tree`, `value`, `defaultValue`, `onValueChange`. Configures tree select, nested checkbox, indeterminate behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of tree-select-readback?

Future-items semantics apply only when the group is open (open !== false). Readback wording is English by default; override the text props Server requirement: backend verification for tree-select-readback.

How does Tree Select Readback meet accessibility guidelines?

Expand buttons use aria-expanded/aria-controls and an aria-label. Children are a role=group labelled by the parent. Checkboxes use <label>s. Readback in a polite live region. Minimizes errors: tree checkbox selected too much, select parent selects all.

Which components pair with Tree Select Readback?