Skip to content

Click spark Updated#961

Closed
R1SH4BH81 wants to merge 13 commits into
magicuidesign:mainfrom
R1SH4BH81:Click-Spark
Closed

Click spark Updated#961
R1SH4BH81 wants to merge 13 commits into
magicuidesign:mainfrom
R1SH4BH81:Click-Spark

Conversation

@R1SH4BH81

Copy link
Copy Markdown

Description

This PR addresses recent code review feedback for the click-spark component. It significantly optimizes the animation loop to prevent unnecessary CPU/battery usage, fixes registry dependency imports, and completely modernizes the component's interactive demo.

Changes

  • Refactor (Performance): Paused the requestAnimationFrame loop in click-spark.tsx when there are no active sparks to save CPU and battery, automatically resuming on new clicks.
  • Feature (Demo): Redesigned the click-spark-demo.tsx aesthetic. Removed the basic button and replaced it with a premium, sleek silver gradient typography (Interactive Spark) to better showcase the effect.
  • Refactor (Dependencies): Removed the unused @magicui/dot-pattern from the registryDependencies in click-spark-demo.json and registry-examples.ts.
  • Bug Fix (Docs): Fixed the installation CLI command in click-spark.mdx to correctly point to add @magicui/click-spark.
  • Refactor: Extracted spark settings into a stable useRef to remove unnecessary re-renders and fix useEffect exhaustive-deps warnings.

Motivation

The previous implementation kept requestAnimationFrame running infinitely at 60fps even when the screen was empty, causing unnecessary background processing and battery drain. The demo component was also visually basic and didn't align with the premium aesthetic of the library. Lastly, the registry dependencies and docs contained minor inaccuracies that would confuse users during installation.

Breaking Changes

None. The component's props and usage remain entirely backwards compatible.

Screenshots

Device / Browser / Viewport: Desktop Chrome

image

@vercel

vercel Bot commented May 3, 2026

Copy link
Copy Markdown

@R1SH4BH81 is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

R1SH4BH81 and others added 4 commits May 3, 2026 13:07
* feat: add kinetic-text component

* fix: address pr feedback

* fix: correct component source

* fix: undo backlight sidebar move

* fix(kinetic-text): forward native props and allow style variable overrides

* docs(kinetic-text): align as prop type docs with implementation

* fix(kinetic-text): prevent rest props from overriding internal styles

* docs(kinetic-text): align as prop type docs and format mdx

---------

Co-authored-by: Abdimajid Shire <abdimajid.ms99.com>
Co-authored-by: Jinho Yeom <pwlsghq@naver.com>
@Yeom-JinHo Yeom-JinHo self-requested a review May 8, 2026 16:36
@Yeom-JinHo

Copy link
Copy Markdown
Member

@R1SH4BH81
Thanks for the PR! A few things before this can be review:

  1. Rebase onto main
  2. Re-run the registry build — public/r/click-spark.json, click-spark-demo.json, registry.json, and llms-full.txt are out of sync with the source (named vs default export mismatch, stale button dependency). Users running npx shadcn add @magicui/click-spark would get broken code as-is.
  3. Update the PR description — it describes refactors, but the diff is a new component addition.
  • MDX date: 2024-06-01 looks like a placeholder

Happy to re-review 🙏

@Yeom-JinHo

Copy link
Copy Markdown
Member

Looks like the rebase wasn't clean — this PR contains unrelated changes (kinetic-text). I'll close it for now and reopen with only the click-spark changes.

@Yeom-JinHo Yeom-JinHo closed this May 27, 2026
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.

3 participants