import { MenuButton } from "@pixxl-tools/components";
// In Server Components:
import { MenuButton } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | — | Render the single child element instead, with this component's props, classes, handlers and ref merged in. |
fullWidth | boolean | — | Stretch to the container's inline size. |
leading | ReactNode | — | Icon or element before the label (decorative; give the button a text label). |
loading | boolean | — | Busy state: shows a spinner and sets aria-busy + aria-disabled; the button stays focusable but ignores clicks and never submits. |
showIndicator | boolean | true | Trailing chevron that marks the button as opening a menu (default true; trailing replaces it). |
size | ButtonSize | — | Control height: xs 24, sm 32, md 40 (default), lg 48 px. |
tone | ButtonTone | — | Color role. Default "neutral". |
trailing | ReactNode | — | Icon or element after the label. |
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.
fullWidthboolean
Stretch to the container's inline size.
leadingReactNode
Icon or element before the label (decorative; give the button a text label).
loadingboolean
Busy state: shows a spinner and sets aria-busy + aria-disabled; the button stays focusable but ignores clicks and never submits.
showIndicatordefault trueboolean
Trailing chevron that marks the button as opening a menu (default true; trailing replaces it).
sizeButtonSize
Control height: xs 24, sm 32, md 40 (default), lg 48 px.
toneButtonTone
Color role. Default "neutral".
trailingReactNode
Icon or element after the label.
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.
<MenuButton>Actions</MenuButton>