Skip to content

fix(docs): text animator demo and co located css#501

Merged
hari merged 5 commits into
mainfrom
feat/text-animator-demo-and-co-located-css
Jun 11, 2026
Merged

fix(docs): text animator demo and co located css#501
hari merged 5 commits into
mainfrom
feat/text-animator-demo-and-co-located-css

Conversation

@sudhashrestha

@sudhashrestha sudhashrestha commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Refactor

    • Moved component styling out of inline blocks into co-located CSS files for cleaner components and better reduced-motion handling.
  • New Features

    • Added a demo wrapper and shared preset for text animation previews to standardize stories and previews.
  • Documentation

    • Updated installation and contributing guides to require co-located CSS files and reflect the new preset/demo flow.
  • Chores

    • Build tooling now bundles co-located CSS automatically; minor UI/styling tweaks and .gitignore updated.

sudhashrestha and others added 4 commits June 11, 2026 19:27
Move keyframes and selectors Tailwind cannot express into imported
.css files, update manual install docs for multi-file touch commands,
and bundle co-located css in the registry build.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bare text-animator runtime, co-located demo css for index and Storybook,
TextAnimatorListDemo wrapper for lazy-loaded MDX previews, and updated
preset docs with runtime install steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@sudhashrestha sudhashrestha requested a review from hari June 11, 2026 13:46
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a075d9a-71d6-438a-9885-ff3005cce36c

📥 Commits

Reviewing files that changed from the base of the PR and between 541d11b and 8ccecaa.

📒 Files selected for processing (8)
  • animata/button/algolia-white-button.tsx
  • animata/feature-cards/content-scan.css
  • content/docs/button/algolia-blue-button.mdx
  • content/docs/button/algolia-white-button.mdx
  • content/docs/button/ripple-button.mdx
  • content/docs/card/card-spread.mdx
  • content/docs/card/collab-card.mdx
  • content/docs/fabs/flower-menu.mdx

📝 Walkthrough

Walkthrough

This PR moves inline component styles into co-located @layer components .css files (imported by their TSX), centralizes Storybook text-animator preset args, adds demo/demo-frame CSS and a TextAnimatorListDemo component, updates build bundling to include co-located CSS, and revises docs/installation to the two-file (TSX + CSS) pattern.

Changes

CSS Externalization & Text Animator Infrastructure

Layer / File(s) Summary
Styling policy, ignore
CLAUDE.md, content/docs/contributing/guidelines.mdx, .gitignore
Prohibit inline <style> in components and add .patterns/ to .gitignore.
Background animations moved to CSS
animata/background/animated-beam.css, animata/background/animated-beam.tsx, animata/background/shooting-stars.css, animata/background/shooting-stars.tsx
Keyframes and reduced-motion rules moved from inline <style> into co-located .css imports.
Buttons: Algolia / Ripple
animata/button/*.css, animata/button/*.tsx
Box-shadow and ripple keyframes moved into algolia-blue-button.css, algolia-white-button.css, ripple-button.css; TSX files import those styles and remove inline style blocks.
Cards & Collab
animata/card/*.css, animata/card/*.tsx
Card spread, collab cursor/burst/ping keyframes and reduced-motion handling moved into card-spread.css and collab-card.css; components import them.
Container & Marquee
animata/container/*
Animated border-trail and marquee keyframes/@property moved to animated-border-trail.css and marquee.css; TSX imports updated.
FABs (speed-dial, flower-menu)
animata/fabs/*.css, animata/fabs/*.tsx
Directional keyframes and petal transitions extracted to CSS files with reduced-motion overrides; components import them.
Feature cards & Skeleton
animata/feature-cards/content-scan.css, animata/feature-cards/content-scan.tsx, animata/skeleton/category-skeleton.tsx
Highlight scan styles moved to CSS; skeleton SVG hover class adjusted.
Preloader split-reveal
animata/preloader/split-reveal.css, animata/preloader/split-reveal.tsx
Shutters/progress keyframes and reduced-motion overrides moved to split-reveal.css; component removes inline style generator.
Scroll stacked sections
animata/scroll/stacked-sections.css, animata/scroll/stacked-sections.tsx
Transform-origin rule moved into stacked-sections.css and imported.
Text animator: CSS rewrite, demo & runtime
animata/text/text-animator.css, animata/text/text-animator.tsx, animata/text/text-animator-demo.css, animata/text/text-animator-demo.ts, animata/text/text-animator-preset.stories-shared.ts
text-animator.css rewritten as explicit @layer components; demo CSS and frame constants added; runtime detects demo-mode and sets data-text-animator-demo; shared preset constant exported.
Storybook Story Args
animata/text/*.stories.tsx
Multiple story files updated to import and use TEXT_ANIMATOR_PRESET_STORY_ARGS instead of inline args.
MDX & Demo wiring
components/text-animator-list-demo.tsx, components/mdx-components.tsx, content/docs/text/index.mdx
Added TextAnimatorListDemo component, registered it in MDX components, and wrapped numerous text demo previews in the index with this demo wrapper.
Docs: two-file installation updates
content/docs/** (many MDX files)
Manual installation steps and CLI notes updated across component docs to create/paste co-located .css files alongside .tsx files; how-it-works text adjusted where keyframes moved to CSS.
Build & global styles
scripts/build-registry.js, styles/globals.css
Registry bundling now includes co-located CSS imports discovered in source files; global CSS imports new demo CSS.
Minor UI tweaks
components/sidebar-nav.tsx, components/component-list-item.tsx, app/(main)/*.tsx
Small Tailwind class adjustments for alignment, spacing, and typography.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • codse/animata#479: Related changes touching card-spread animation/styling.
  • codse/animata#483: Related stacked-sections implementation that previously used inline styles.
  • codse/animata#487: Prior background components refresh (shooting stars / animated beam) related to animation keyframes.

Suggested reviewers

  • hari

🐰 Styles now rest in files quite neat,
No more <style> blocks to clutter the beat,
With CSS co-located, so organized and bright,
Your components are cleaner, structured just right!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/text-animator-demo-and-co-located-css

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying animata with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8ccecaa
Status:⚡️  Build in progress...

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (3)
content/docs/card/collab-card.mdx (1)

25-25: 💤 Low value

Consider plural wording for clarity.

The text says "This creates collab-card.tsx" but the command creates two files (.tsx and .css). Consider: "This creates collab-card.tsx and collab-card.css in components/animata/card."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@content/docs/card/collab-card.mdx` at line 25, Update the sentence that
currently reads "This creates `collab-card.tsx` in `components/animata/card`" to
list both generated files; change it to something like "This creates
`collab-card.tsx` and `collab-card.css` in `components/animata/card`" so it
accurately reflects that both the .tsx and .css files are created (referencing
the filenames `collab-card.tsx`, `collab-card.css` and the folder
`components/animata/card`).
content/docs/card/card-spread.mdx (1)

21-21: 💤 Low value

Consider plural wording for clarity.

The text says "a new file card-spread.tsx" but the command creates two files (.tsx and .css). Consider: "It will create new files card-spread.tsx and card-spread.css inside the components/animata/card directory."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@content/docs/card/card-spread.mdx` at line 21, The sentence currently states
it will create "a new file `card-spread.tsx`" but the generator actually creates
two files; update the wording to plural and list both files so it's accurate:
change the phrase to something like "It will create new files `card-spread.tsx`
and `card-spread.css` inside the `components/animata/card` directory" ensuring
you reference both filenames (`card-spread.tsx`, `card-spread.css`) and keep
directory `components/animata/card`.
content/docs/button/ripple-button.mdx (1)

21-21: 💤 Low value

Consider plural wording for clarity.

The text says "a new file called ripple-button.tsx" but the command creates two files (.tsx and .css). Consider: "It will create new files ripple-button.tsx and ripple-button.css inside the components/animata/button directory."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@content/docs/button/ripple-button.mdx` at line 21, Update the sentence to use
plural and list both created files: change "It will create a new file called
`ripple-button.tsx` inside the `compoents/animata/button` directory." to
something like "It will create new files `ripple-button.tsx` and
`ripple-button.css` inside the `components/animata/button` directory." —
reference the filenames `ripple-button.tsx`, `ripple-button.css` and the
directory name `components/animata/button`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@animata/button/algolia-white-button.tsx`:
- Line 6: Update the button label string that currently reads "Aloglia White" to
the correct spelling "Algolia White" in the component rendered by
algolia-white-button.tsx (look for the JSX/return that renders the button label
"Aloglia White" and replace that literal with "Algolia White"); ensure any
aria-labels, tests, or i18n keys in the same file that repeat the typo are also
updated to maintain consistency.

In `@animata/feature-cards/content-scan.css`:
- Around line 8-10: Replace the hardcoded highlight/background colors with theme
design tokens: update .highlight.active (currently using `#dad9fe`) to use the
brand highlight token (e.g. var(--color-brand-yellow) or your theme token name
such as --token-highlight-bg set to `#ffcc00`) and replace the hardcoded text
color (the occurrence of `#4b0082`) with the appropriate theme text token (e.g.
var(--color-on-highlight) or --token-text-color) so both .highlight.active and
any .highlight text styles use theme tokens instead of literal hex values.

In `@content/docs/button/algolia-blue-button.mdx`:
- Around line 21-24: Update the explanatory sentence in
content/docs/button/algolia-blue-button.mdx to reflect that the command creates
both a .tsx and a .css file (algolia-blue-button.tsx and
algolia-blue-button.css) in the components/animata/button directory so it
matches the bash command shown (mkdir -p components/animata/button && touch
components/animata/button/algolia-blue-button.tsx
components/animata/button/algolia-blue-button.css); keep the rest of the prose
intact.

In `@content/docs/button/ripple-button.mdx`:
- Line 21: Update the misspelled directory name in the prose: replace
"compoents/animata/button" with the correct "components/animata/button" in the
text that says it will create `ripple-button.tsx`; search for the string
"compoents/animata/button" (near the mention of `ripple-button.tsx`) and correct
it to "components/animata/button".

In `@content/docs/fabs/flower-menu.mdx`:
- Line 22: Update the two sentences that currently state only creating
`flower-menu.tsx` so they mention both files created (`flower-menu.tsx` and
`flower-menu.css`) to match the commands; e.g., change "It will create a new
file `flower-menu.tsx`" to "It will create two new files, `flower-menu.tsx` and
`flower-menu.css`" and make the same edit in the other occurrence to keep the
manual text consistent with the co-located CSS migration.

---

Nitpick comments:
In `@content/docs/button/ripple-button.mdx`:
- Line 21: Update the sentence to use plural and list both created files: change
"It will create a new file called `ripple-button.tsx` inside the
`compoents/animata/button` directory." to something like "It will create new
files `ripple-button.tsx` and `ripple-button.css` inside the
`components/animata/button` directory." — reference the filenames
`ripple-button.tsx`, `ripple-button.css` and the directory name
`components/animata/button`.

In `@content/docs/card/card-spread.mdx`:
- Line 21: The sentence currently states it will create "a new file
`card-spread.tsx`" but the generator actually creates two files; update the
wording to plural and list both files so it's accurate: change the phrase to
something like "It will create new files `card-spread.tsx` and `card-spread.css`
inside the `components/animata/card` directory" ensuring you reference both
filenames (`card-spread.tsx`, `card-spread.css`) and keep directory
`components/animata/card`.

In `@content/docs/card/collab-card.mdx`:
- Line 25: Update the sentence that currently reads "This creates
`collab-card.tsx` in `components/animata/card`" to list both generated files;
change it to something like "This creates `collab-card.tsx` and
`collab-card.css` in `components/animata/card`" so it accurately reflects that
both the .tsx and .css files are created (referencing the filenames
`collab-card.tsx`, `collab-card.css` and the folder `components/animata/card`).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f89dbb16-5049-4dea-b439-efdd263f18f7

📥 Commits

Reviewing files that changed from the base of the PR and between f6836c1 and 541d11b.

📒 Files selected for processing (97)
  • .gitignore
  • CLAUDE.md
  • animata/background/animated-beam.css
  • animata/background/animated-beam.tsx
  • animata/background/shooting-stars.css
  • animata/background/shooting-stars.tsx
  • animata/button/algolia-blue-button.css
  • animata/button/algolia-blue-button.tsx
  • animata/button/algolia-white-button.css
  • animata/button/algolia-white-button.tsx
  • animata/button/ripple-button.css
  • animata/button/ripple-button.tsx
  • animata/card/card-spread.css
  • animata/card/card-spread.tsx
  • animata/card/collab-card.css
  • animata/card/collab-card.tsx
  • animata/container/animated-border-trail.css
  • animata/container/animated-border-trail.tsx
  • animata/container/marquee.css
  • animata/container/marquee.tsx
  • animata/fabs/flower-menu.css
  • animata/fabs/flower-menu.tsx
  • animata/fabs/speed-dial.css
  • animata/fabs/speed-dial.tsx
  • animata/feature-cards/content-scan.css
  • animata/feature-cards/content-scan.tsx
  • animata/preloader/split-reveal.css
  • animata/preloader/split-reveal.tsx
  • animata/scroll/stacked-sections.css
  • animata/scroll/stacked-sections.tsx
  • animata/skeleton/category-skeleton.tsx
  • animata/text/blur-out-up.stories.tsx
  • animata/text/bottom-up-letters.stories.tsx
  • animata/text/fade-through.stories.tsx
  • animata/text/focus-blur-resolve.stories.tsx
  • animata/text/kinetic-center-build.stories.tsx
  • animata/text/line-by-line-slide.stories.tsx
  • animata/text/mask-reveal-up.stories.tsx
  • animata/text/micro-scale-fade.stories.tsx
  • animata/text/per-character-rise.stories.tsx
  • animata/text/per-word-crossfade.stories.tsx
  • animata/text/scale-down-fade.stories.tsx
  • animata/text/shared-axis-y.stories.tsx
  • animata/text/shared-axis-z.stories.tsx
  • animata/text/shimmer-sweep.stories.tsx
  • animata/text/short-slide-down.stories.tsx
  • animata/text/short-slide-right.stories.tsx
  • animata/text/soft-blur-in.stories.tsx
  • animata/text/spring-scale-in.stories.tsx
  • animata/text/text-animator-demo.css
  • animata/text/text-animator-demo.ts
  • animata/text/text-animator-preset.stories-shared.ts
  • animata/text/text-animator.css
  • animata/text/text-animator.tsx
  • animata/text/top-down-letters.stories.tsx
  • app/(main)/components/page.tsx
  • app/(main)/page.tsx
  • components/component-list-item.tsx
  • components/mdx-components.tsx
  • components/sidebar-nav.tsx
  • components/text-animator-list-demo.tsx
  • content/docs/background/animated-beam.mdx
  • content/docs/background/shooting-stars.mdx
  • content/docs/button/algolia-blue-button.mdx
  • content/docs/button/algolia-white-button.mdx
  • content/docs/button/ripple-button.mdx
  • content/docs/card/card-spread.mdx
  • content/docs/card/collab-card.mdx
  • content/docs/container/animated-border-trail.mdx
  • content/docs/container/marquee.mdx
  • content/docs/contributing/guidelines.mdx
  • content/docs/fabs/flower-menu.mdx
  • content/docs/fabs/speed-dial.mdx
  • content/docs/preloader/split-reveal.mdx
  • content/docs/scroll/stacked-sections.mdx
  • content/docs/text/blur-out-up.mdx
  • content/docs/text/bottom-up-letters.mdx
  • content/docs/text/fade-through.mdx
  • content/docs/text/focus-blur-resolve.mdx
  • content/docs/text/index.mdx
  • content/docs/text/kinetic-center-build.mdx
  • content/docs/text/line-by-line-slide.mdx
  • content/docs/text/mask-reveal-up.mdx
  • content/docs/text/micro-scale-fade.mdx
  • content/docs/text/per-character-rise.mdx
  • content/docs/text/per-word-crossfade.mdx
  • content/docs/text/scale-down-fade.mdx
  • content/docs/text/shared-axis-y.mdx
  • content/docs/text/shared-axis-z.mdx
  • content/docs/text/shimmer-sweep.mdx
  • content/docs/text/short-slide-down.mdx
  • content/docs/text/short-slide-right.mdx
  • content/docs/text/soft-blur-in.mdx
  • content/docs/text/spring-scale-in.mdx
  • content/docs/text/top-down-letters.mdx
  • scripts/build-registry.js
  • styles/globals.css

Comment thread animata/button/algolia-white-button.tsx Outdated
Comment thread animata/feature-cards/content-scan.css
Comment thread content/docs/button/algolia-blue-button.mdx Outdated
Comment thread content/docs/button/ripple-button.mdx Outdated
Comment thread content/docs/fabs/flower-menu.mdx Outdated
@codse codse deleted a comment from cursor Bot Jun 11, 2026
Correct Algolia label typo, use brand highlight tokens in content-scan,
and align manual install prose with two-file touch commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hari hari merged commit f9e15dd into main Jun 11, 2026
4 of 6 checks passed
@hari hari deleted the feat/text-animator-demo-and-co-located-css branch June 11, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants