motionsnack

Animated React sections that already feel finished.

Copy them into Next.js or add them with one command. Plain React and Tailwind, light and dark.

New sections, once a month

One short email when something new lands. No spam.

Library

  • Sections
  • Blocks
  • Components
  • Application UI
  • Templates

Popular

  • Hero
  • Gallery
  • Testimonials
  • Stats
  • Logos
  • FAQ

Resources

  • Installation
  • All components
  • All blocks
  • All sections
  • All application UI
  • Design system
  • Changelog
  • Pricing

Company

  • About
  • Contact
  • Terms
  • Privacy

Install

npx motionsnack add <name>Step-by-step guidehello@motionsnack.dev
Kuba Šťastný@kubastastnydev

© 2026 motionsnack. All rights reserved.

TermsPrivacy

motionsnack

motionsnack
DocsSectionsTemplatesWhat's newPricing
Get lifetime access
  1. Home
  2. Docs
  3. Components
  4. Select
  5. Tree Select
ComponentsBlocksSectionsApplication UI
ComponentsBlocksSectionsApplication UI

Accordion

  • Spring Accordion

Alert

  • Glow Alert

Audio

  • Podcast PlayerNew
  • Voice NoteNew
  • Voice RecorderNew

Avatar

  • Avatar Stack

Badge

  • Pulse Badge

Breadcrumb

  • Slide Breadcrumb

Button

  • Chip ButtonNew
  • Glow Border Button
  • Glow ButtonNew
  • Plain ButtonNew

Calendar

  • Month Calendar

Checkbox

  • Checkbox CardsNew
  • Checkbox GroupNew
  • Chip CheckboxNew

Cropper

  • Image Cropper

Dialog

  • Spring Dialog

Dropdown

  • Command MenuNew
  • Stagger Dropdown
  • Switcher DropdownNew

File Upload

  • Drop Zone Upload

Input

  • Addon InputNew
  • Button InputNew
  • Copy InputNew
  • Date InputNew
  • Floating Label Input
  • Joined InputsNew
  • Notched Label InputNew
  • Number StepperNew
  • OTP InputNew
  • Password InputNew
  • Phone InputNew
  • Range InputNew
  • Search InputNew
  • Tag InputNew
  • Text FieldNew

Loader

  • Curtain LoaderNew
  • Greeting LoaderNew
  • Line LoaderNew
  • Meter LoaderNew
  • Split LoaderNew

Navigation Menu

  • Mobile Tab BarNew

Notification

  • Notification BellNew
  • Toast Stack

Pagination

  • Sliding Pagination

Popover

  • Spring Popover

Radio

  • Card Radio Group
  • Payment MethodNew
  • Radio GroupNew
  • Rating RadioNew

Select

  • ComboboxNew
  • Glide Select
  • Multi SelectNew
  • Rich SelectNew
  • Select FieldNew
  • Tree SelectNew

Sidebar

  • Icon RailNew

Slider

  • Glow Slider

Stepper

  • Progress Stepper

Switch

  • Billing SwitchNew
  • Switch RowNew
  • Toggle SwitchNew

Table

  • Sortable Table

Tabs

  • Sliding Tabs

Textarea

  • Auto Grow Textarea

Toggle

  • Icon ToggleNew
  • Theme ToggleNew
  • Toggle GroupNew

Tooltip

  • Follow Tooltip

Select

Tree Select

New

A select whose options form a tree, with branches that fold open, cascading checkboxes and a search that keeps the path to every match.

npx motionsnack add tree-select

Customize

px
px
px
<TreeSelect />

Props

32 properties

PropertyTypeDefaultDescription
nodes{ id: string; label: string; description?: string; icon?: string; children?: Node[]; disabled?: boolean }[]demo services treeThe tree of choices. A node with children is a branch, one without is a leaf.
defaultExpandedstring[]['design']Ids of the branches open when the list first opens.
valuestring[]-Controlled value: the picked ids. Leave undefined to let the component manage it.
defaultValuestring[][]Value on first render when uncontrolled.
onChange(ids: string[], nodes?: TreeSelectNode[]) => void-Called with the picked ids and their nodes.
openboolean-Controlled open state of the list. Leave undefined to let the component manage it.
defaultOpenbooleanfalseOpen state on first render when uncontrolled.
onOpenChange(open: boolean) => void-Called whenever the user opens or closes the list.
errorColorstring-Overrides the error colour on both themes (keep 4.5 : 1). Left out, the theme pair #dc2626 / #ef4444 is used.
namestring-Name submitted with a form; the ids go comma-joined.
idstringgeneratedId of the field.
classNamestring''Extra classes on the wrapper.
labelstring'Services'Label above the field. Empty hides it.
placeholderstring'Pick services'Text in the field while nothing is picked.
helperTextstring'Pick everything you need, we will quote it together.'Small text under the field. Empty hides it.
errorstring''Error message. Any text marks the field invalid and replaces the helper text.
selectionMode'leaves' | 'all''leaves'With Multiple: the value holds only checked leaves, or also every fully checked branch.
searchPlaceholderstring'Search services'Hint in the search box.
noResultsTextstring'No results'Text when the search finds nothing.
heightnumber48Height of the field. With several chips it grows.
radiusnumber12Corner radius of the field.
listMaxHeightnumber320Tallest the list gets before it scrolls.
maxVisibleChipsnumber3Most chips in the field; the rest fold into +N more.
multiplebooleantruePick several nodes with checkboxes. Without it one leaf is picked and the list closes.
searchablebooleantrueA search box at the top of the list that filters the tree.
showGuidesbooleantrueThin vertical lines that show which branch a row belongs to.
showIconsbooleantrueShow the node icons.
showDescriptionsbooleanfalseShow the line under each node's label.
clearablebooleanfalseAn × in the field that clears the choice.
requiredbooleanfalseMarks the field as required.
disabledbooleanfalseDisables the field.
readOnlybooleanfalseShows the value at full contrast; focusable, but the list never opens.

About Tree Select

Tree Select is for choices that nest: services under disciplines, pages under sections, products under categories. Closed, it looks like every other field of the library; open, a list drops 6px below it and its rows come in one after another out of a soft blur. Each branch has a chevron that turns as its children fold open with a smooth height and fade, and thin guide lines show which branch a row belongs to. Checking a branch checks everything under it, and a branch with only some children checked shows a dash. In the field the picks show as chips, a fully checked branch as one chip, folding into +N more after a number you set. The search box at the top filters the tree as you type, keeps the path to every match visible and opens it, and shows the matched letters in full contrast. The keyboard follows the tree pattern people know from file browsers: arrows up and down, right to open or step in, left to close or step out, Home, End, Space, Enter, star to open a whole level and typing to jump. The value can hold only the checked leaves or the fully checked branches too, and a single-pick mode closes the list on a leaf.

What's included

  • Branches that fold open with a smooth height and fade
  • Cascading checkboxes with a mixed state on parents
  • Search that keeps and opens the path to every match
  • Chips in the field, a full branch as one chip
  • Tree keyboard: arrows, Home/End, Space, Enter, star, typeahead
  • Leaves-only or full-branch value, or single pick
  • Light and dark look
Type
Animated React select component
Library
Components · Select
Stack
Next.js, React, Tailwind CSS
Added
2026-11-23
Install
npx motionsnack add tree-select