Magoo Component UI logo Magoo Component UI
← Catalog

SDK Install Card

sdk-install-card molecule experimental

An install command with package-manager tabs (npm, pnpm, yarn, pip) and one-click copy.

Also in: CardsNavigation

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
$ npm install @example/sdk
$ pnpm add @example/sdk
$ yarn add @example/sdk
PipOnly
$ pip install example-sdk

Props

NameTypeReq
commands array ✓

Related components

How to use

Layout and the initially visible command are pure markup (the active command carries data-active=true; inactive panels are hidden by a data-[active=false]:hidden utility), so a line renders in screenshots with no JavaScript. behavior.js wires the interaction: clicking a manager tab - or arrowing Left/Right/Home/End - activates it and reveals its command; the copy button reads the active panel's data-command attribute (so the "$ " prompt is never copied), calls navigator.clipboard.writeText, and briefly shows "Copied!". It dispatches sdk-install-card:change (detail.index) on switch. The portable self-init reads everything from the DOM - no props object.

Use cases

cardnav WCAG AA SEO 30 dir: ltr ai-generated