shadcn.io is not affiliated with official shadcn/ui
- Group
- Icons
- Inputs
librarycode?framework?name?names?packageManager?- Access
- Read-only
When to use it
- After
search_icons, to add the icons it found: several at once withnames. - For a set without a package, as a component in the project's framework, or plain SVG.
Inputs
librarystring
Its set, from search_icons: lucide.
code?boolean
A component, even from a set with a package.
framework?"react" | "vue" | "svelte" | "solid" | "angular" | "preact" | "svg"
Default react.
- Type
"react" | "vue" | "svelte" | "solid" | "angular" | "preact" | "svg"
name?string
Its name in the set: arrow-right. Or names.
names?string[]
Several from one set: one import or command.
packageManager?"npm" | "pnpm" | "yarn" | "bun"
From the lockfile. Default npm.
- Type
"npm" | "pnpm" | "yarn" | "bun"
Example prompts
Name the server, so the agent doesn't answer from memory:
Call and response
Asked “Add the sidebar's icons”, the agent sends this call. The response is real, trimmed: long lists show their first items and long strings are cut.
get_icon({ library: "lucide", names: ["house", "settings", "log-out"] }){
"import": "import { HouseIcon, SettingsIcon, LogOutIcon } from \"lucide-react\";",
"package": "lucide-react",
"framework": "react",
"icons": [
{
"name": "house",
"export": "HouseIcon",
"usage": "<HouseIcon />"
},
{
"name": "settings",
"export": "SettingsIcon",
"usage": "<SettingsIcon />"
},
"… 1 more"
],
"library": "lucide"
}Call it by hand
Your MCP client sends this for you. To try the tool without one, post the call yourself; the server answers in server-sent events, the result on the data: line.
What your agent reads
The server's description of get_icon, one of the Icons tools. Your agent reads it to decide when to call the tool:
Icons for your framework: from a set with a package (Lucide, Tabler, Radix, Heroicons, Phosphor), the import; otherwise a component (React: one CLI command). names for several.Next
FAQ
Why do I get an import instead of a file?
The import, from the set's package: import { HouseIcon } from "lucide-react". Most shadcn projects have lucide-react already, so nothing is added. Without the package, install it, or pass code: true for a standalone component.
Where does an icon component get saved?
For React, one shadcn CLI command adds it to components/icons. Any other framework gets file: the path to save code at.