SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

InstallCommand

The install line a docs page prints for its packages, spelled by each package manager in a synced set of code tabs.

Terminal
npm install @sdxc/ui @sdxc/u @sdxc/icons
Terminal
pnpm add @sdxc/ui @sdxc/u @sdxc/icons
Terminal
yarn add @sdxc/ui @sdxc/u @sdxc/icons
Terminal
bun add @sdxc/ui @sdxc/u @sdxc/icons
Terminal
npm install -D vite-plus @cloudflare/vite-plugin
Terminal
pnpm add -D vite-plus @cloudflare/vite-plugin
Terminal
yarn add -D vite-plus @cloudflare/vite-plugin
Terminal
bun add -D vite-plus @cloudflare/vite-plugin
View code
tsx
<InstallCommand
	packages={["@sdxc/ui", "@sdxc/u", "@sdxc/icons"]}
	title="Terminal"
	aria-label="Package manager"
	labels={{ copy: "Copy code", copied: "Copied" }}
/>

<InstallCommand
	packages={["vite-plus", "@cloudflare/vite-plugin"]}
	dev
	title="Terminal"
	aria-label="Package manager"
	labels={{ copy: "Copy code", copied: "Copied" }}
/>

Demo docs sites

Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.

Every demo, landings and docs sites alike, is listed in the demo gallery.

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { InstallCommand } from "@sdxc/ui/docs";

Renders one terminal block per manager inside a synced CodeTabs.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
packagesreadonly string[]YesPackage specifiers to install, such as ["@sdxc/ui", "remix@3.1.0"].
devbooleanNoInstalls them as development dependencies.
syncKeystringNoDefaults to package-manager, so every install line on the site follows one choice.
persistCodeTabsPersistenceNoWhere the choice is remembered; see CodeTabs. Defaults to local.
selectedstringNoThe manager to render selected, such as the one a cookie remembered.
managersreadonly Manager[]NoThe managers to offer, in order. Defaults to npm, pnpm, yarn and bun.
titlestringNoThe header each block reads as, such as "Terminal".
labelsCodeBlock.LabelsYes
"aria-label"stringYesNames the strip for assistive technology, such as "Package manager".

Also accepts everything in Omit<TagProps<"form">, "children" | "aria-label" | "title">.

Types

NameValuesWhat it decides
Manager"npm" | "pnpm" | "yarn" | "bun"A package manager the strip offers, which is also the value its sync key stores.

Other components this module publishes.

  • installLine
@sdxc/ui

Can’t find it? Contact us