# Shared Axis Z

Text scales up and fades out while new text scales in from small, simulating depth on the Z axis.

> 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/shared-axis-z
```

<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 { SharedAxisZ } from "@/components/framecn/shared-axis-z";
```

```tsx
<SharedAxisZ fromText="Hello world" toText="New world" />
```

## API Reference

### SharedAxisZ

| Prop               | Type     | Default         |
| ------------------ | -------- | --------------- |
| `fromText`         | `string` | `"Hello world"` |
| `toText`           | `string` | `"New world"`   |
| `fontSize`         | `number` | `72`            |
| `color`            | `string` | `"#171717"`     |
| `fontWeight`       | `number` | `600`           |
| `speed`            | `number` | `1`             |
| `fps`              | `number` | `30`            |
| `durationInFrames` | `number` | `90`            |
| `className`        | `string` | `-`             |

## Notes

  The exiting text scales up slightly while blurring out, and the entering text
  scales in from 90% while unblurring. The two animations overlap by two frames
  for a seamless handoff.