Skip to content

Add JSDoc with previews in icons-react#1472

Open
theopak wants to merge 1 commit intotabler:mainfrom
theopak:theopak/2026-02-06-types
Open

Add JSDoc with previews in icons-react#1472
theopak wants to merge 1 commit intotabler:mainfrom
theopak:theopak/2026-02-06-types

Conversation

@theopak
Copy link

@theopak theopak commented Feb 6, 2026

Screenshot 2026-02-06 at 1 19 59 PM

This PR adds JSDoc annotations to the icons-react package so that people using it can see a preview of the icon, and links to the documentation, by hovering over the icon component in supported IDEs like VSCode.

I added this for my own convenience and just wanted to share. I got the idea from a different icon library that uses this same technique: lucide-icons/lucide#1424

AI Disclosure: This change was implemented with AI assistance (Claude Opus 4.6, Cursor Tab) and reviewed by me.

Encode each icon's SVG as a base64 data URI in the @Preview JSDoc tag,
enabling IDE hover previews for all icon components. JSDoc is added to
both the individual icon files and the barrel re-exports so that
rollup-plugin-dts preserves them in the bundled .d.ts output.

Co-authored-by: Cursor <[email protected]>
@vercel
Copy link

vercel bot commented Feb 6, 2026

@theopak is attempting to deploy a commit to the Tabler Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

✅ All icons are valid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant