Button
Installation
import { Button } from "@o/pipeline/experimental/components/button";
Default
Icons
Icons should not be supplied as children, and should be supplied to the button via the following props:
iconStart(or theiconalias)iconEnd
Icon-only buttons must have an aria-label specified on the SVG element for accessibility.
intent
Change the color scheme of a button to visually cue the user on the nature of the action.
none(default): for neutral actions without a strong emphasissuccess: for actions that are positive or confirmatory in naturedanger: for destructive or potentially negative actions
Combine with the variant prop…
variant
Changes the aesthetics of the button to blend accordingly with the context of its usage.
variant="solid"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
variant="ghost"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
choice
Used for actions that display a value chosen by the user, such as a Choice.
Note
Currently, the choice prop only supports intent="none".
When a value isn’t set, a placeholder attribute should also be supplied.
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
shape
Sets the button’s geometry along two independent axes: corner rounding and width.
Defaults to "square" for icon-only buttons (a single icon/iconEnd/collapsible, no other content) and "rectangle" otherwise.
The pinned shapes ("square"/"circle") lock width to height, so their content must fit a square box — they’re intended for a single icon. Adding text to one keeps the 1:1 lock and truncates rather than growing. For an elongated fully-rounded button, use "pill". The width pin also wins over stretch: a stretched "square"/"circle" stays 1:1, while a stretched "rectangle"/"pill" fills its container.
size
disabled
Prevent user interaction
Note
For elements that don’t support the disabled attribute — such as <a> elements — we mimic disabled behavior by disabling pointer events completely.
pending
Indicate a busy or loading state, preventing interaction and providing feedback to the user — replacing content with a spinner.
pressed
Indicate an active or pressed state, such as a Menu trigger when its menu is open.
Note
This is not applied automatically when combined with collapsible and an open state to provide additional flexibility.
stretch
Fill the button to the width of its container
shrink
Allows the button to shrink smaller than its content if necessary to avoid overflow (true by default)
collapsible
Indicate to the user that the button toggles another element’s visibility with a visual cue (e.g. a caret that rotates when open).
This can be combined with pressed where relevant.
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
render
Customize the underlying element to your needs
e.g. a link:
bleed
Allow the button to extend beyond its normal bounds via negative margins.
Note
bleed works on square/circle buttons: the offset is the icon inset — (height - icon-size) / 2, the same distance an icon-only button bleeds — rather than the text-button padding a square doesn’t have. A bled square button’s content therefore lines up flush with its surroundings.
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"
- size="sm"
- size="md"
- size="lg"
- size="sm"
- stretchsize="sm"
- stretchsize="md"
- stretchsize="lg"
- stretchsize="sm"