BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shipbase/ui/tree-view

tree-view

shipbase-ui/tree-view
FreeComponent

shipbase/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/tree-view.json

Source

./src/components/ui/tree-view.tsxraw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/tree-view.json
1"use client"
2
3import * as React from "react"
4
5import { TreeView as TreeViewPrimitive } from "@ark-ui/react/tree-view"
6
7import { cn } from "@/lib/utils"
8
9const TreeView = TreeViewPrimitive.Root
10
11const TreeViewProvider = TreeViewPrimitive.RootProvider
12
13const TreeViewContext = TreeViewPrimitive.Context
14
15const TreeViewTree = TreeViewPrimitive.Tree
16
17const TreeViewNodeProvider = TreeViewPrimitive.NodeProvider
18
19const TreeViewNodeContext = TreeViewPrimitive.NodeContext
20
21const TreeViewBranch = React.forwardRef<
22 React.ElementRef<typeof TreeViewPrimitive.Branch>,
23 TreeViewPrimitive.BranchProps
24>(({ className, ...props }, ref) => (
25 <TreeViewPrimitive.Branch
26 ref={ref}
27 className={cn("", className)}
28 {...props}
29 />
30))
31TreeViewBranch.displayName = "TreeViewBranch"
32
33const TreeViewBranchControl = React.forwardRef<
34 React.ElementRef<typeof TreeViewPrimitive.BranchControl>,
35 TreeViewPrimitive.BranchControlProps
36>(({ className, ...props }, ref) => (
37 <TreeViewPrimitive.BranchControl
38 ref={ref}
39 className={cn(
40 "flex w-full items-center gap-2 rounded-md px-2 py-1 text-primary hover:bg-muted",
41 className
42 )}
43 {...props}
44 />
45))
46TreeViewBranchControl.displayName = "TreeViewBranchControl"
47
48const TreeViewBranchTrigger = TreeViewPrimitive.BranchTrigger
49
50const TreeViewBranchIndicator = TreeViewPrimitive.BranchIndicator
51
52const TreeViewBranchText = TreeViewPrimitive.BranchText
53
54const TreeViewBranchIndentGuide = React.forwardRef<
55 React.ElementRef<typeof TreeViewPrimitive.BranchIndentGuide>,
56 TreeViewPrimitive.BranchIndentGuideProps
57>(({ className, ...props }, ref) => (
58 <TreeViewPrimitive.BranchIndentGuide
59 ref={ref}
60 className={cn(
61 "absolute top-0 left-2 h-full w-px rounded bg-border",
62 className
63 )}
64 {...props}
65 />
66))
67TreeViewBranchIndentGuide.displayName = "TreeViewBranchIndentGuide"
68
69const TreeViewBranchContent = React.forwardRef<
70 React.ElementRef<typeof TreeViewPrimitive.BranchContent>,
71 TreeViewPrimitive.BranchContentProps
72>(({ className, ...props }, ref) => (
73 <TreeViewPrimitive.BranchContent
74 ref={ref}
75 className={cn("relative pl-4", className)}
76 {...props}
77 />
78))
79TreeViewBranchContent.displayName = "TreeViewBranchContent"
80
81const TreeViewItem = React.forwardRef<
82 React.ElementRef<typeof TreeViewPrimitive.Item>,
83 TreeViewPrimitive.ItemProps
84>(({ className, ...props }, ref) => (
85 <TreeViewPrimitive.Item
86 ref={ref}
87 className={cn(
88// … truncated

What it pulls in

npm packages

  • @ark-ui/react

Files it writes

  • ./src/components/ui/tree-view.tsx

Facts

Registry
shipbase/ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
today

Go to the source

ui.shipbase.xyz shipbase/ui on GitHub Raw registry item This item as JSON

More from shipbase/ui

All 32 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshipbase/uiComponentsFree2 deps
avataravatarshipbase/uiComponentsFree1 dep
badgebadgeshipbase/uiComponentsFree2 deps
buttonbuttonshipbase/uiComponentsFree2 deps
cardcardshipbase/uiComponentsFree1 dep
checkboxcheckboxshipbase/uiComponentsFree2 deps
collapsiblecollapsibleshipbase/uiComponentsFree1 dep
comboboxcomboboxshipbase/uiComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex