Verb Cluster
Separate buttons are a Stack, right-aligned, at most two.
import { Stack } from '@usefragments/ui';
<Stack direction="row" gap="sm" justify="end">
<Button variant="soft">Cancel</Button>
<Button>Save</Button>
</Stack>Fuses two actions into one control, a split button, with one hairline between them.
import { CaretDown } from '@phosphor-icons/react';
import { IconButton } from '@usefragments/ui';
import { Menu } from '@usefragments/ui';
<ButtonGroup aria-label="Save options">
<Button variant="soft">Save</Button>pnpm add @usefragments/uiThe npm package stays managed by your package manager. Import styles once from @usefragments/ui/styles. See the installation guide for framework and theme setup.
Separate buttons are a Stack, right-aligned, at most two.
import { Stack } from '@usefragments/ui';
<Stack direction="row" gap="sm" justify="end">
<Button variant="soft">Cancel</Button>
<Button>Save</Button>
</Stack>Prop | Type | Default | Description |
|---|---|---|---|
aria-label | string | undefined | Not set | Names the group; required unless aria-labelledby is set |
aria-labelledby | string | undefined | Not set | ID of the element that names the group |
childrenRequired | React.ReactNode | Not set | The fused actions: a Button and an IconButton menu trigger; at most two |