# November 11, 2026

Animation DSL prop for five motion-ready components.

> 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).

Adds an `animation` prop to **Accordion**, **Collapsible**, **Trace**, **Credit Card**, and **Text Morph**. Pass a string DSL to control the reveal transition without importing `motion` directly.

### Animation [#animation]

<ComponentPreview name="accordion" title="accordion.tsx">
<AccordionDemo />
</ComponentPreview>

All five components accept `animation`, a compact string that maps to Motion transition options.

| Component | Where the prop lives | Notes |
| :-- | :-- | :-- |
| Accordion | Root + `AccordionContent` | Per-item override on content. |
| Collapsible | Root + `CollapsibleContent` | Per-instance override on content. |
| Trace | `TraceCollapsible` + `TraceCollapsibleContent` | Ignored when `animateHeight={false}`. |
| Credit Card | `CreditCardNumber` | Per-character; uses `stagger` as delay. |
| Text Morph | `TextMorph` | Overrides `transition` prop when set. |

Accepted forms:

| Form | Example |
| :-- | :-- |
| Named easing | `"easeInOut"`, `"easeOutExpo"` |
| Named easing + duration | `"easeInOut 300ms"` |
| Custom curve | `"cubic-bezier(0.4, 0, 0.2, 1) 300ms"` |
| Spring | `"spring(300, 25)"` |
| Inertia | `"inertia(0.2, 400)"` |
| Keyframes | `"keyframes([0, 1.2, 1], [0, 0.5, 1]) 500ms"` |

Any form supports `delay(...)` and `repeat(n | infinite)`. Pass `animation={false}` to disable.

```tsx
<Accordion animation="spring(300, 25)" collapsible type="single">
  <AccordionItem value="a">
    <AccordionTrigger>Question</AccordionTrigger>
    <AccordionContent animation="easeInOut 200ms">Answer</AccordionContent>
  </AccordionItem>
</Accordion>
```

Parsed by `lib/motion-dsl.ts`, scaffolded on `frakment init`.

#### Installation [#installation]

<Steps>
<Step>
Install the component
</Step>

```bash
npx frakment add accordion
```

<Step>
Use it with an animation
</Step>

```tsx
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";

<Accordion animation="spring(300, 25)" collapsible type="single">
<AccordionItem value="a">
  <AccordionTrigger>Question</AccordionTrigger>
  <AccordionContent>Answer</AccordionContent>
</AccordionItem>
</Accordion>
```
</Steps>

See the [Accordion docs](/docs/components/accordion#animation) for the full syntax and per-item override.

### Changed [#changed]

**Message Animated** now renders user messages with the `muted` Bubble variant instead of the solid `default` variant. Softer contrast in dark mode where the primary surface is near-white.