getItemTargetPath() — ui Function Reference
Architecture documentation for the getItemTargetPath() function in api.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3c11564a_93a3_54bb_b29e_b57518169213["getItemTargetPath()"] c41eed12_c415_48c8_bcf4_9d09d3424a18["api.ts"] 3c11564a_93a3_54bb_b29e_b57518169213 -->|defined in| c41eed12_c415_48c8_bcf4_9d09d3424a18 style 3c11564a_93a3_54bb_b29e_b57518169213 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/registry/api.ts lines 259–281
export async function getItemTargetPath(
config: Config,
item: Pick<z.infer<typeof registryItemSchema>, "type">,
override?: string
) {
if (override) {
return override
}
if (item.type === "registry:ui") {
return config.resolvedPaths.ui ?? config.resolvedPaths.components
}
const [parent, type] = item.type?.split(":") ?? []
if (!(parent in config.resolvedPaths)) {
return null
}
return path.join(
config.resolvedPaths[parent as keyof typeof config.resolvedPaths],
type
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getItemTargetPath() do?
getItemTargetPath() is a function in the ui codebase, defined in packages/shadcn/src/registry/api.ts.
Where is getItemTargetPath() defined?
getItemTargetPath() is defined in packages/shadcn/src/registry/api.ts at line 259.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free