feat(ui): add animated content primitive (#2212)

This commit is contained in:
Neko
2026-08-04 17:48:17 +08:00
committed by GitHub
parent 4f4d256a49
commit 47c23e6467
5 changed files with 241 additions and 26 deletions
+15
View File
@@ -10,6 +10,21 @@ Source: `packages/ui/src/components/`
## Animations
### AnimatedContent
Behavior-only primitive that animates height, opacity, vertical offset, and an
inner content blur from an external `data-state="open|closed"` lifecycle. The
lifecycle owner must keep the primitive mounted until the closing animation
finishes. It can compose with Reka UI content primitives through `as-child`, but
does not depend on a specific menu, popover, or presence implementation. Visual
styling remains caller-owned.
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `as` | `PrimitiveProps['as']?` | `'div'` | Element or component rendered as the animated outer container |
**Slots**: `default`
### TransitionBidirectional
Bidirectional Vue `<Transition>` wrapper with customizable CSS classes.