SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

InstallTabs

Package-manager or language chooser plus a command row.

npm add @beacon/cli
bun add @beacon/cli
pnpm add @beacon/cli
View code
tsx
<InstallTabs name="preview-install" aria-label="Package manager">
	<InstallTabs.Option value="npm" label="npm" defaultChecked>
		npm add @beacon/cli
	</InstallTabs.Option>
	<InstallTabs.Option value="bun" label="bun">
		bun add @beacon/cli
	</InstallTabs.Option>
	<InstallTabs.Option value="pnpm" label="pnpm">
		pnpm add @beacon/cli
	</InstallTabs.Option>
</InstallTabs>

Demo landings

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 { InstallTabs } from "@sdxc/ui/landing";

Renders a radio-driven dialect strip. Nest InstallTabs.Option children; the checked option's command row reveals via CSS.

Composition

The parts the component publishes, each a static property of the host.

  • InstallTabs
  • InstallTabs.OptionOne dialect: a radio, its label, and a command row that shows when checked.

Props

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

PropTypeRequiredDescription
namestringYesShared name for the radio group that switches dialects. Required so multiple strips on one page stay independent.
"aria-label"stringYesAccessible name for the strip. Required — the library ships no copy.
childrenRemixNodeYesOne or more InstallTabs.Option dialects.

Also accepts everything in TagProps<"form">.

InstallTabs.Option

PropTypeRequiredDescription
valuestringYesRadio value written for this dialect.
labelRemixNodeYesVisible tab label for the dialect.
defaultCheckedbooleanNoMarks this dialect as the initially selected one. Only one option in a strip should pass defaultChecked.
actionsRemixNodeNoOptional trailing control beside the command — typically a copy button the page supplies.
childrenRemixNodeYesCommand or snippet shown when this dialect is selected.

Also accepts everything in TagProps<"div">.

@sdxc/ui

Can’t find it? Contact us