Button

Solid tones

Solid buttons are high-emphasis actions. Brand is the default and primary call-to-action. Neutral and critical are used for secondary and destructive actions respectively.

<Inline
space="small"
alignY="center">
<Button tone="brand">Brand</Button>
<Button tone="neutral">Neutral</Button>
<Button tone="critical">Critical</Button>
</Inline>

Soft tones

Soft buttons are lower-emphasis alternatives. They use a tinted background and matching text tone without a solid fill, making them suitable alongside solid buttons or in contexts where a strong call-to-action would be too prominent.

<Inline
space="small"
alignY="center">
<Button
variant="soft"
tone="neutral">
Neutral
</Button>
<Button
variant="soft"
tone="critical">
Critical
</Button>
<Button
variant="soft"
tone="caution">
Caution
</Button>
<Button
variant="soft"
tone="positive">
Positive
</Button>
<Button
variant="soft"
tone="info">
Info
</Button>
<Button
variant="soft"
tone="promote">
Promote
</Button>
</Inline>

Sizes

Standard is the default. Small is for compact contexts such as toolbars or inline actions.

<Inline
space="small"
alignY="center">
<Button size="standard">Standard</Button>
<Button size="small">Small</Button>
</Inline>

Disabled

Disabled buttons are visually dimmed and non-interactive. Both variants support the disabled state.

<Inline
space="small"
alignY="center">
<Button disabled>Disabled</Button>
<Button
variant="soft"
disabled>
Disabled
</Button>
</Inline>

Invoker commands

The commandFor and command props wire a button to any dialog or popover by ID using the HTML Invoker Commands API, with no JavaScript required. Here a button opens the MobileNavigation dialog by targeting its ID.

<Button
commandFor="demo-nav"
command="show-modal">
Open menu
</Button>
<MobileNavigation
id="demo-nav"
title="Lloyd Atkinson"
links={[
{ title: 'Articles', to: '/articles/' },
{ title: 'Notes', to: '/notes/' },
{ title: 'Speaking', to: '/speaking/' },
{ title: 'About', to: '/about/' },
]}
iconLinks={[
{ title: 'Read', to: '/reading/', icon: 'books' },
{ title: 'RSS Feed', to: '/rss.xml', icon: 'rss' },
{ title: 'Contact', to: '/inbox/', icon: 'envelope' },
]}
/>