react-bits icon indicating copy to clipboard operation
react-bits copied to clipboard

[FEAT]: Component `tags` are empty on all 166 entries, and search only matches the title

Open Agnik47 opened this issue 3 months ago • 1 comments

Share your suggestion

Every component's tags array is empty, and component search only matches the title.

src/constants/Information.js declares tags as part of ComponentMetadata:

/**
 * @property {string[]} tags
 */

but all 166 of 166 entries ship tags: []. Nothing populates it, so the field is currently dead weight.

Separately, src/components/common/ComponentList.jsx filters with:

return categoryOk && fuzzyMatch(title, term);

Only the title. Description and tags are mapped into the item (ComponentList.jsx line ~125 sets tags, description) but never searched.

The practical effect: searching the component index for what an effect is rather than what it is named returns nothing. "particles", "gooey", "webgl", "shader", "parallax", "cursor", "marquee", "hover" all miss components that obviously match. You have to already know the name to find it, which is the opposite of what a 166-component browse page needs.

Proposed change

  1. Populate tags for all 166 entries in Information.js — technique (webgl, shader, canvas, svg, gsap, three, css-only), interaction (hover, scroll, cursor, click, drag) and visual family (particles, gradient, glitch, blur, distortion, 3d).
  2. Extend the filter in ComponentList.jsx to match title + description + tags, keeping the existing fuzzy behaviour and title-first ranking.
  3. Surface the tags where they already have a natural home:
    • scripts/generateLlmsText.js — append tags to each catalogue line in llms.txt.
    • jsrepo.config.ts — it already forwards meta to every registry item (meta: component.meta), but componentMetadata never sets meta, so it is always undefined. Passing { tags } through means the tags land in public/r/*.json and become visible to anyone browsing the registry through the shadcn MCP server, which is the flow the MCP docs page recommends.

Step 3 is the part I think is most valuable and it costs almost nothing, because the plumbing already exists — it is just never fed.

Steps 1 and 2 stand alone if you would rather keep the scope small; step 3 can follow separately.

Additional context

Related: I've opened #1058 about the prop tables having drifted from the component sources. Both come from the same audit — happy to keep them as independent PRs.

I'd like to work on this if you're open to it. Since step 1 is a judgement call across 166 entries, I'd rather agree the tag vocabulary with you here first than send a large PR you then have to re-tag.

Validations

  • [X] I have checked other issues to see if my issue was already discussed or addressed

Agnik47 avatar Aug 31 '26 13:08 Agnik47

No need to worry about this :)

DavidHDev avatar Aug 31 '26 15:08 DavidHDev