ComponentsInstall Command

Install Command

A package-manager aware install command with tabs for npm, pnpm, yarn and bun and one-click copy.

Preview

Terminal
pnpm dlx shadcn@latest add https://localhostui.com/r/install-command.json

Installation

  1. 1

    Run the following command

    npx shadcn@latest add https://localhostui.com/r/install-command.json
    

Props

PropTypeDefaultDescription
commands*Partial<Record<"npx" | "pnpm" | "yarn" | "bun" | "npm", string>>—Map of package manager to full install command string. Only managers present here appear in the dropdown. "npm" is accepted as an alias for "npx" — if both are omitted the npx slot falls back to the npm value.
titlestring—Label shown in the terminal header next to the terminal icon.
defaultManager
"npx""pnpm""yarn""bun"
—Which package manager is selected on initial render. Falls back to the first available manager (in pnpm, bun, yarn, npx order) if omitted or not present in commands.
classNamestring—Additional class names merged onto the outer wrapper div.