# Code Accordion

Long code blocks collapse mid-section, hiding noise behind a count badge.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/code-accordion
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { CodeAccordion } from "@/components/framecn/code-accordion";
```

```tsx
<CodeAccordion />
```

## API Reference

### CodeAccordion

| Prop               | Type               | Default               |
| ------------------ | ------------------ | --------------------- |
| `lines`            | `string[]`         | `DEFAULT_LINES`       |
| `collapseRange`    | `[number, number]` | `[3, 14]`             |
| `collapseAt`       | `number`           | `30`                  |
| `title`            | `string`           | `"process-orders.ts"` |
| `fontSize`         | `number`           | `16`                  |
| `width`            | `number`           | `720`                 |
| `background`       | `string`           | `"#050505"`           |
| `cardColor`        | `string`           | `"#0a0a0a"`           |
| `textColor`        | `string`           | `"#e4e4e7"`           |
| `mutedColor`       | `string`           | `"#52525b"`           |
| `speed`            | `number`           | `1`                   |
| `fps`              | `number`           | `30`                  |
| `durationInFrames` | `number`           | `150`                 |
| `height`           | `number`           | `720`                 |
| `className`        | `string`           | `-`                   |

## Notes

  Long code blocks collapse in the middle with a line count badge. Click to
  expand and see the full code.