# Emboss > A tactile React component library where state is depth: pressed things depress, active things rise, inputs are recessed wells, and every shadow derives from one movable light source (two CSS variables). Components are distributed as TypeScript source through a shadcn-compatible registry — no npm package, the code lands in the consumer's repo. Requires React 19 and Tailwind CSS v4. MIT licensed. ## Install Add the registry namespace to components.json: ```json { "registries": { "@emboss": "https://embossui.vercel.app/r/{name}.json" } } ``` Then add components: `npx shadcn@latest add @emboss/` — or directly by URL with no configuration: `npx shadcn@latest add https://embossui.vercel.app/r/.json`. The registry index for tooling is https://embossui.vercel.app/r/registry.json. Design tokens arrive automatically with the first component. Theme with five variables on :root — --light-x, --light-y (light direction), --depth (relief intensity), --accent-h (accent hue in oklch degrees), --radius-scale. ## Component reference ### Button (`@emboss/button`) A momentary push button that rests embossed, depresses to flush while held, and springs back with a machined overshoot. Install: `npx shadcn@latest add @emboss/button` Usage: ```tsx import { Button } from "@/components/ui/button"; export function Example() { return ( ); } ``` #### Button Extends the native button element. All standard button props are supported. | Prop | Type | Default | Description | | --- | --- | --- | --- | | variant | `"default" | "accent" | "danger" | "ghost" | "link"` | "default" | Visual role. Accent and danger carry color in addition to depth; ghost rests flat and presses into the surface; link renders as an inline link. | | size | `"sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-lg"` | "md" | Control height. The icon sizes render a square footprint for icon-only buttons. | | render | `ReactElement | (props, state) => ReactElement` | — | Swaps the rendered element while keeping button behavior — the element must stay a real button. For links styled as buttons, put buttonVariants classes on the anchor instead. | | disabled | `boolean` | false | Disables interaction and dims the control. | Keyboard: Space — Activates and holds the press. · Enter — Activates the button. --- ### Kbd (`@emboss/kbd`) A machined keycap for keyboard shortcuts — a semantic kbd element with a raised, lit-from-above profile. Install: `npx shadcn@latest add @emboss/kbd` Usage: ```tsx import { Kbd } from "@/components/ui/kbd"; export function Example() { return (

Save with S

); } ``` #### Kbd Extends the native kbd element. | Prop | Type | Default | Description | | --- | --- | --- | --- | | children | `ReactNode` | — | The key legend, e.g. ⌘ or Esc. | --- ### Card (`@emboss/card`) A surface for grouped content with three seatings: raised off the page, flush with it, or recessed into a well. Install: `npx shadcn@latest add @emboss/card` Usage: ```tsx import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; export function Example() { return ( Output level Master bus, post-fader. Signal is nominal. ); } ``` #### Card | Prop | Type | Default | Description | | --- | --- | --- | --- | | variant | `"raised" | "flush" | "well"` | "raised" | Seating relative to the page surface: lifted, level, or recessed. | #### CardHeader / CardTitle / CardDescription / CardContent / CardFooter Layout parts. Each renders a div with a data-slot attribute for styling hooks. --- ### Input (`@emboss/input`) A recessed text well. Focus brightens the floor of the well; invalid state deepens the recess and inks the text in danger. Install: `npx shadcn@latest add @emboss/input` Usage: ```tsx import { Input } from "@/components/ui/input"; export function Example() { return ; } ``` #### Input Extends the native input element and composes with Base UI Field for label and message wiring. | Prop | Type | Default | Description | | --- | --- | --- | --- | | size | `"sm" | "md" | "lg"` | "md" | Control height of the well. | | defaultValue / value / onChange | `string / string / ChangeEventHandler` | — | Standard controlled and uncontrolled usage. | --- ### Switch (`@emboss/switch`) A console slide switch: the thumb travels a milled channel and seats with a sprung settle, with engraved I/O glyphs for state. Install: `npx shadcn@latest add @emboss/switch` Usage: ```tsx import { Switch } from "@/components/ui/switch"; export function Example() { return ; } ``` #### Switch | Prop | Type | Default | Description | | --- | --- | --- | --- | | checked / defaultChecked / onCheckedChange | `boolean / boolean / (checked) => void` | — | Controlled and uncontrolled usage. | | name / value | `string / string` | — | Form participation through a hidden input when used inside a form. | | disabled | `boolean` | false | Disables interaction and dims the control. | Data attributes: - `data-checked / data-unchecked`: Reflects the current state for styling. Keyboard: Space — Toggles the switch. · Enter — Toggles the switch. --- ### Tabs (`@emboss/tabs`) Layered panels switched by a flush rail of triggers — the active tab seats into the rail like a latched key. Install: `npx shadcn@latest add @emboss/tabs` Usage: ```tsx import { Tabs, TabsContent, TabsList, TabsTrigger, } from "@/components/ui/tabs"; export function Example() { return ( One Two First panel Second panel ); } ``` #### Tabs The root. Provides value state to the rail and panels. | Prop | Type | Default | Description | | --- | --- | --- | --- | | value / defaultValue / onValueChange | `string / string / (value) => void` | — | Controlled and uncontrolled selection. | #### TabsList The recessed rail that houses the triggers. | Prop | Type | Default | Description | | --- | --- | --- | --- | | activateOnFocus | `boolean` | true | Whether arrow-key focus also selects the tab. Emboss defaults this on. | #### TabsTrigger | Prop | Type | Default | Description | | --- | --- | --- | --- | | value | `string` | — | The tab this trigger activates. | Data attributes: - `data-active`: Present on the active trigger. #### TabsContent | Prop | Type | Default | Description | | --- | --- | --- | --- | | value | `string` | — | The tab this panel belongs to. | Keyboard: ArrowLeft+ArrowRight — Moves focus and selection along the rail. · Home — Selects the first tab. · End — Selects the last tab. --- ### Textarea (`@emboss/textarea`) A multi-line recessed well with focus brightening and content-based growth in supporting browsers. Install: `npx shadcn@latest add @emboss/textarea` Usage: ```tsx import { Textarea } from "@/components/ui/textarea"; export function Example() { return