# Fold Text · Pro

Each line folds down into place like a hinge, from edge-on to flat, one after another as the block scrolls into view. A small spring overshoot makes it settle like a real hinge.

This is a Charcoal UI Pro component. Its source and examples are available with a Pro seat: https://charcoalui.com/pricing

## With a Pro seat

1. Add the registry to components.json:

```json
{
  "registries": {
    "@charcoal": {
      "url": "https://charcoalui.com/r/{name}.json",
      "headers": {
        "Authorization": "Bearer ${CHARCOAL_LICENSE_KEY}"
      }
    }
  }
}
```

2. Copy your licence key from https://charcoalui.com/dashboard and put it in .env.local as CHARCOAL_LICENSE_KEY, then:

```bash
npx shadcn@latest add @charcoal/fold-text
```

To read Pro source through this MCP server, reconnect it with the header "Authorization: Bearer <licence key>".

## API — Fold Text
| Prop | Type | Default | Notes |
| --- | --- | --- | --- |
| `lines` | `string[]` | — | One string per line. |
| `stagger` | `number` | `0.12` | Seconds between lines. |
| `duration` | `number` | `0.7` | Seconds for one line to fold flat. |
| `once` | `boolean` | `true` | Animate the first time only. |
| `hinge` | `"top" \| "bottom"` | `"top"` | Which edge the line swings on. |
| `perspective` | `number` | `900` | Perspective distance in px; smaller is more dramatic. |
| `delay` | `number` | `0` |  |
| `as` | `ElementType` | `"div"` |  |
| `className` | `string` | — |  |
| `lineClassName` | `string` | — |  |

See it live: https://charcoalui.com/docs/components/fold-text