Code Example 6 - Code viewer with file treePro

An editor-style section with a collapsible project file tree on the left and the selected file’s source on the right, plus breadcrumbs. Use it to show how a starter kit or template project is structured.

About Code Example 6

An editor-style section with a collapsible project file tree on the left and the selected file’s source on the right, plus breadcrumbs. Use it to show how a starter kit or template project is structured.

Code Example 6 is a pro code example block for React, built on shadcn/ui and Tailwind CSS. It ships as 111 lines of TypeScript you own: every piece of copy is a prop with a sensible default, so you can drop it in and replace the content without touching the layout.

  • code
  • file-tree
  • editor
  • project
  • starter
  • template

Installation

  1. Add the Chocolate UI registry to your components.json (see the installation guide).
  2. Run the shadcn CLI:
npx shadcn@latest add @chocolate/code-example-06

Dependencies installed automatically: lucide-react.

Uses: reveal, utils.

Usage

import CodeExample06 from "@/components/blocks/code-example-06"

export default function Page() {
  return <CodeExample06 />
}

FAQ