🧩 Icon path inconsistency between Sanity schema and UI component
Problem:
The Sanity icon schema currently saves only the raw Lucide icon name (e.g. "Activity"),
but the Icon component expects the full path format required by [ic0n.dev](https://github.com/nuotsu/ic0n.dev), including the icon set prefix and component name:
<img src="https://ic0n.dev/lu/LuActivity" alt="" />
Because of this mismatch, components like Feature.tsx must manually build the full ic0n value:
const icon: Sanity.Icon = {
_type: "icon",
ic0n: `lu/Lu${iconName}?hex=FFFFFF`,
size: "32px",
};
This workaround introduces redundant logic and breaks consistency between Sanity data and the Icon component.
Reference:
https://github.com/nuotsu/ic0n.dev
<img src="https://ic0n.dev/<ICON_SET>/<ICON_NAME>" alt="" />
Improvement idea:
- Add a color field (e.g.
"color" or "hex") to the Sanity schema to control icon color.
- Add a prefix (icon set) option or logic inside
Icon to automatically prepend lu/Lu to short icon names (e.g. "Activity" → "lu/LuActivity").
Expected:
-
Schema and UI both use compatible ic0n formats.
-
Editors can choose icon color and optionally icon set.
-
The Icon component correctly builds URLs like:
<img src="https://ic0n.dev/lu/LuActivity?hex=FFFFFF" alt="" />
Files affected:
src/sanity/schemaTypes/objects/icon.tsx
src/ui/Icon.tsx
src/ui/modules/Feature.tsx
🧩 Icon path inconsistency between Sanity schema and UI component
Problem:
The Sanity
iconschema currently saves only the raw Lucide icon name (e.g."Activity"),but the
Iconcomponent expects the full path format required by [ic0n.dev](https://github.com/nuotsu/ic0n.dev), including the icon set prefix and component name:Because of this mismatch, components like
Feature.tsxmust manually build the fullic0nvalue:This workaround introduces redundant logic and breaks consistency between Sanity data and the
Iconcomponent.Reference:
Improvement idea:
"color"or"hex") to the Sanity schema to control icon color.Iconto automatically prependlu/Luto short icon names (e.g."Activity"→"lu/LuActivity").Expected:
Schema and UI both use compatible
ic0nformats.Editors can choose icon color and optionally icon set.
The
Iconcomponent correctly builds URLs like:Files affected:
src/sanity/schemaTypes/objects/icon.tsxsrc/ui/Icon.tsxsrc/ui/modules/Feature.tsx