Ownable Install
Install Tree from the TailNG registry with the shadcn-like flow. This copies source files into your app so your team can own and evolve the implementation locally.
Install from registry
Run from your Angular workspace root.
pnpm
pnpm dlx tailng add treenpx
npx tailng add treeGenerated files
The command scaffolds local files under src/app/tailng-ui/tree.
src/app/tailng-ui/tree/tng-tree-primitive.tssrc/app/tailng-ui/tree/tng-tree.tssrc/app/tailng-ui/tree/tng-tree.htmlsrc/app/tailng-ui/tree/tng-tree.csssrc/app/tailng-ui/tree/index.ts
Import in your feature module/component
Imports
import { TngTree, TngTreePrimitive } from './tailng-ui/tree';
Usage
Template usage
<tng-tree
[nodes]="navigationNodes"
[defaultExpandedIds]="['workspace', 'guides']"
[defaultSelectedId]="'tree'"
ariaLabel="Documentation tree"
/>
<!-- navigationNodes -->
<!--
readonly navigationNodes = [
{ id: 'workspace', label: 'Docs', description: 'Product documentation root' },
{ id: 'guides', label: 'Guides', parentId: 'workspace' },
{ id: 'navigation', label: 'Navigation', parentId: 'guides' },
{ id: 'tree', label: 'Tree', parentId: 'navigation' },
];
-->