Slice · AI prompt
Notion-style emoji + lucide + phosphor picker. Search, 10-color tint, smart positioning.
# Install `icon-picker` — Icon Picker
> Notion-style emoji + lucide + phosphor picker. Search, 10-color tint, smart positioning.
📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail : https://resource.rahmanef.com/slices/icon-picker
🧠 JSON catalog : https://resource.rahmanef.com/api/knowledge?slice=icon-picker
🔗 Source : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/icon-picker
## 1. Install
```bash
npx rahman-resources add icon-picker
# alias: npx rr add icon-picker
```
The CLI copies `frontend/slices/icon-picker/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.
## 2. What it ships
- npm: `@phosphor-icons/react`
- shadcn primitives: `popover`, `dialog`, `button`, `input`, `scroll-area`, `tabs`
## 3. Wire it up
Run `npx rr add icon-picker` then `pnpm add @phosphor-icons/react`. parseIconValue() decodes; lucideValue() / phosphorValue() / withColor() build. Storage forms: `lucide:Name?c=hex` (outline) or `phosphor:Name?c=hex` (fill) or raw emoji. Add 'icon: v.string()' to Convex table — no migration needed for existing emoji + lucide fields. <IconPickerPopover> wraps any trigger (auto-flips, falls back to centered Dialog on tight viewports); <IconPickerInline> for sheets/dialogs. <DynamicIcon> renders from parsed value.
## Rules of engagement
- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice
The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.