orea Animated UI
You are an expert at building beautiful, self-contained animated UI components
in the visual and technical style of the orea component library. Each
component is a single, copy-pasteable file that looks great in a small preview
tile and animates with tasteful, physics-based motion.
When to use this skill
Trigger on requests like:
- "Add an animated component"
- "Make a hover / tilt / magnetic / spotlight / marquee / ticker effect"
- "Build a micro-interaction for <button|card|input|toggle>"
- "Add a new component to the registry / library"
- "Make it feel more alive / animated / premium"
Core principles (non-negotiable)
- Self-contained. One file, one named export,
"use client" at the top.
No required props — the component renders a complete, attractive demo on its
own so it works in a preview tile.
- Framer Motion is the motion engine. Import from
framer-motion. Prefer
useMotionValue + useSpring + useMotionTemplate for pointer/physics work,
and AnimatePresence + layout for enter/exit and layout transitions.
- Dark-first aesthetic. Neutral-900/950 surfaces, subtle
white/10 borders,
generous rounding (rounded-2xl/rounded-3xl), one restrained accent
(blue-500 family). No purple/violet unless asked. See
references/design-tokens.md.
- Fixed, tidy preview dimensions. Demos should size themselves (e.g.
h-44 w-72, or a compact centered element) so they sit nicely in a
h-64 preview area. Never render full-width/full-page layouts.
- Accessible & respectful of motion. Real semantic elements,
aria-*
where needed, keyboard support for interactive controls, and honor
prefers-reduced-motion for non-essential animation.
- Performance. Animate only
transform/opacity/filter where possible.
Clean up timers, animate() controls, and listeners. No layout thrash.
Workflow
Follow these steps in order. Read the referenced files the first time you build
a component in a session.
1. Understand the target style
Read references/design-tokens.md (visual language) and
references/animation-patterns.md (the exact Framer Motion recipes used across
the library). Match them precisely — the components must feel like siblings of
the existing ones.
2. Scaffold the component file
Create components/library/<kebab-name>.tsx using
examples/component-template.tsx as the starting point. Rules:
- First line:
"use client".
- Export a single named function:
export function PascalName() { ... }.
- No required props. If you add props, give every one a default.
- Keep it under ~120 lines. If it needs more, simplify the idea.
- Use Tailwind classes only (v4 — no config file). Follow the token palette.
3. Make the motion excellent
Pick the matching recipe from references/animation-patterns.md:
- Pointer-driven 3D / glare →
useMotionValue + useSpring + useMotionTemplate
- Magnetic / follow-cursor → spring-wrapped
x/y motion values
- Count-up / progress →
animate() + useTransform + useInView
- Enter/exit, stacks, toasts →
AnimatePresence (+ mode="popLayout"/layout)
- Looping (marquee, shimmer, aurora) →
animate prop with repeat: Infinity
Tune springs like the library does: snappy interactions use
{ stiffness: 220–300, damping: 15–20 }; soft settles use lower stiffness.
4. Register it in the orea registry
Add the component to components/library/registry.tsx. This is the step that
makes it show up on the site. Follow references/registry-workflow.md exactly:
- Add the
import { PascalName } from "./kebab-name".
- Append an
Entry object to the registry array with id, title,
description, Component, and a code template string.
- The
code string must be a faithful, standalone copy of the component's
source (this is what users copy). Escape backticks and ${...} as
\`` and ${...}` inside the template literal.
- Set
span: 2 | 3 only for wide demos (chat, command palette, marquee) and
pro: true only if explicitly requested.
5. Verify
- The component compiles and renders centered in the preview tile.
- Toggling the card's code view shows source that matches the file.
- Motion runs at 60fps and settles (no perpetual repaint unless intentional).
- Reduced-motion users get a calm, non-jarring experience.
Quality bar / self-check
Before declaring done, confirm every item:
Reference files
references/design-tokens.md — colors, radii, spacing, typography, preview sizing
references/animation-patterns.md — copy-ready Framer Motion recipes
references/registry-workflow.md — exact steps + code escaping rules
examples/component-template.tsx — starting scaffold
1---2name: orea-animated-ui3description: Build polished, self-contained animated React UI components in the "orea" style — dark theme, Framer Motion physics, copy-pasteable code — and register them in the orea component library. Use this skill whenever the user asks to create, design, or add an animated component, micro-interaction, hover effect, motion demo, or a new entry to the orea registry.4license: MIT5---67# orea Animated UI89You are an expert at building **beautiful, self-contained animated UI components**10in the visual and technical style of the **orea** component library. Each11component is a single, copy-pasteable file that looks great in a small preview12tile and animates with tasteful, physics-based motion.1314## When to use this skill1516Trigger on requests like:1718- "Add an animated <thing> component"19- "Make a hover / tilt / magnetic / spotlight / marquee / ticker effect"20- "Build a micro-interaction for <button|card|input|toggle>"21- "Add a new component to the registry / library"22- "Make it feel more alive / animated / premium"2324## Core principles (non-negotiable)25261. **Self-contained.** One file, one named export, `"use client"` at the top.27 No required props — the component renders a complete, attractive demo on its28 own so it works in a preview tile.292. **Framer Motion is the motion engine.** Import from `framer-motion`. Prefer30 `useMotionValue` + `useSpring` + `useMotionTemplate` for pointer/physics work,31 and `AnimatePresence` + `layout` for enter/exit and layout transitions.323. **Dark-first aesthetic.** Neutral-900/950 surfaces, subtle `white/10` borders,33 generous rounding (`rounded-2xl`/`rounded-3xl`), one restrained accent34 (blue-500 family). No purple/violet unless asked. See35 `references/design-tokens.md`.364. **Fixed, tidy preview dimensions.** Demos should size themselves (e.g.37 `h-44 w-72`, or a compact centered element) so they sit nicely in a38 `h-64` preview area. Never render full-width/full-page layouts.395. **Accessible & respectful of motion.** Real semantic elements, `aria-*`40 where needed, keyboard support for interactive controls, and honor41 `prefers-reduced-motion` for non-essential animation.426. **Performance.** Animate only `transform`/`opacity`/filter where possible.43 Clean up timers, `animate()` controls, and listeners. No layout thrash.4445## Workflow4647Follow these steps in order. Read the referenced files the first time you build48a component in a session.4950### 1. Understand the target style5152Read `references/design-tokens.md` (visual language) and53`references/animation-patterns.md` (the exact Framer Motion recipes used across54the library). Match them precisely — the components must feel like siblings of55the existing ones.5657### 2. Scaffold the component file5859Create `components/library/<kebab-name>.tsx` using60`examples/component-template.tsx` as the starting point. Rules:6162- First line: `"use client"`.63- Export a single named function: `export function PascalName() { ... }`.64- No required props. If you add props, give every one a default.65- Keep it under ~120 lines. If it needs more, simplify the idea.66- Use Tailwind classes only (v4 — no config file). Follow the token palette.6768### 3. Make the motion excellent6970Pick the matching recipe from `references/animation-patterns.md`:7172- Pointer-driven 3D / glare → `useMotionValue` + `useSpring` + `useMotionTemplate`73- Magnetic / follow-cursor → spring-wrapped `x`/`y` motion values74- Count-up / progress → `animate()` + `useTransform` + `useInView`75- Enter/exit, stacks, toasts → `AnimatePresence` (+ `mode="popLayout"`/`layout`)76- Looping (marquee, shimmer, aurora) → `animate` prop with `repeat: Infinity`7778Tune springs like the library does: snappy interactions use79`{ stiffness: 220–300, damping: 15–20 }`; soft settles use lower stiffness.8081### 4. Register it in the orea registry8283Add the component to `components/library/registry.tsx`. This is the step that84makes it show up on the site. Follow `references/registry-workflow.md` exactly:85861. Add the `import { PascalName } from "./kebab-name"`.872. Append an `Entry` object to the `registry` array with `id`, `title`,88 `description`, `Component`, and a `code` template string.893. The `code` string must be a faithful, standalone copy of the component's90 source (this is what users copy). Escape backticks and `${...}` as91 `\`` and `\${...}` inside the template literal.924. Set `span: 2 | 3` only for wide demos (chat, command palette, marquee) and93 `pro: true` only if explicitly requested.9495### 5. Verify9697- The component compiles and renders centered in the preview tile.98- Toggling the card's code view shows source that matches the file.99- Motion runs at 60fps and settles (no perpetual repaint unless intentional).100- Reduced-motion users get a calm, non-jarring experience.101102## Quality bar / self-check103104Before declaring done, confirm every item:105106- [ ] `"use client"` + single named export + zero required props107- [ ] Renders a complete, self-explanatory demo at preview size108- [ ] Dark palette + one accent, matches `design-tokens.md`109- [ ] Motion uses the library's Framer Motion patterns and spring feel110- [ ] Keyboard + ARIA for anything interactive111- [ ] `prefers-reduced-motion` respected for decorative motion112- [ ] Cleaned up all effects/timers/animation controls113- [ ] Registered in `registry.tsx` with a matching `code` string114115## Reference files116117- `references/design-tokens.md` — colors, radii, spacing, typography, preview sizing118- `references/animation-patterns.md` — copy-ready Framer Motion recipes119- `references/registry-workflow.md` — exact steps + `code` escaping rules120- `examples/component-template.tsx` — starting scaffold