Component docs
Loading
"use client";
import { CloseButton } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | — | Render the single child element instead, with this component's props, classes, handlers and ref merged in. |
closeLabel | string | from the message catalog | Accessible name of the close button (default from the message catalog). |
pressed | boolean | — | aria-pressed for a toggle whose state you manage. |
size | ButtonSize | — | Control height: xs 24, sm 32, md 40 (default), lg 48 px. |
tone | ButtonTone | — | Color role. Default "neutral". |
variant | ButtonVariant | "secondary" | Emphasis. Defaults to "secondary" for the neutral tone and "solid" for colored tones, so <Button> is a secondary button and <Button tone="primary"> the primary call to action. |
asChildboolean
Render the single child element instead, with this component's props, classes, handlers and ref merged in.
closeLabeldefault from the message catalogstring
Accessible name of the close button (default from the message catalog).
pressedboolean
aria-pressed for a toggle whose state you manage.
sizeButtonSize
Control height: xs 24, sm 32, md 40 (default), lg 48 px.
toneButtonTone
Color role. Default "neutral".
variantdefault "secondary"ButtonVariant
Emphasis. Defaults to "secondary" for the neutral tone and "solid" for colored tones, so <Button> is a secondary button and <Button tone="primary"> the primary call to action.
<CloseButton />