Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA sortable tree that refuses any move, by pointer or keyboard, that would make it deeper than the allowed number of levels, and says so. Use this when menus or categories must stay shallow.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Use it for navigation menus, help-centre trees and category lists where deeper levels are not supported by the design or the back end.
Do not use it when depth is unlimited (use sortable-tree) or to enforce the rule on the server by itself; the server must check it too.
It composes sortable-tree, tree-view, which the CLI installs for you.
import { TaxonomyDepthLimit } from "@/components/taxonomy-depth-limit"<TaxonomyDepthLimit nodes={menu} maxDepth={3} onNodesChange={save} />| Prop | Type | Default | Description |
|---|---|---|---|
nodes | TreeNode[] | - | The starting tree. |
maxDepth | number | - | Most levels allowed. |
onNodesChange | (nodes) => void | - | Called after a move. |
The pattern ships with a Testing Library test (taxonomy-depth-limit.test.tsx) that covers the depth maths, a move within the limit and a refused move.