shadcn.io is not affiliated with official shadcn/ui
- Group
- Inspect
- Inputs
demonamebase?framework?packageManager?uiAlias?- Access
- Read-only
When to use it
- To start from a working example of the component in use.
- After an install, to adapt a demo to the user's page.
Inputs
demostring
Its slug: range.
namestring
As in its URL: date-picker.
base?"base" | "aria" | "ark" | "radix"
React only. Default base (Base UI).
- Type
"base" | "aria" | "ark" | "radix"
framework?"react" | "vue" | "svelte" | "solid"
Default react.
- Type
"react" | "vue" | "svelte" | "solid"
packageManager?"npm" | "pnpm" | "yarn" | "bun"
From the lockfile. Default npm.
- Type
"npm" | "pnpm" | "yarn" | "bun"
uiAlias?string
components.json's aliases.ui (#lib/components/ui): demo imports point there.
Example prompts
Name the server, so the agent doesn't answer from memory:
Call and response
Asked “Give me the Calendar's range demo for Vue”, the agent sends this call. The response is real, trimmed: long lists show their first items and long strings are cut.
get_demo({ demo: "range", framework: "vue", name: "calendar" }){
"code": "<script setup lang=\"ts\">\nimport { shallowRef } from \"vue\"\nimport { type DateValue, parseDate } from \"@ark-ui/vue/date-picker\"\nimport { Calen…",
"demo": "range",
"file": "calendar/example-range.vue",
"language": "vue",
"preview": "https://kit.dev/view/ui/vue/calendar/range",
"title": "Range",
"uses": [
"calendar"
],
"name": "calendar",
"target": "Vue · Ark UI"
}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_demo, one of the Inspect tools. Your agent reads it to decide when to call the tool:
One demo's code, imports pointing at your components (uiAlias: yours from components.json); the components it uses, the packages it needs besides (packages), and the files it imports from beside it (a Svelte demo's nested components). A form guide's demos come per base.
Next
- get_component_apiProps, data attributes, CSS variables, keyboard
- get_install_planEvery file and package an install needs
FAQ
Where do the demo slugs come from?
get_component lists a component's demos with their slugs. An unknown slug returns the list too.
What does a demo need besides its code?
uses names the components it imports (install them with it). packages names the npm packages it imports that those installs don't bring, like @tanstack/react-table for the Table's data table, with packagesInstall, the command for your packageManager.