<Button> Component

Primary



Share
Code Editor
<Button intent="primary" text="Hello world" />

Secondary



Share
Code Editor
<Button intent="secondary" text="Hello world" />

Size


Share
Code Editor
<Columns align={{ x: "start" }} count={2}>
<Button intent="primary" text="Large Button" />
<Button intent="primary" text="Medium Button" size="medium" />
</Columns>

Theming

Share
Code Editor
<Columns align={{ x: "start" }} count={4}>
<div style={{ display: 'grid', gap: 8, padding: 24 }}>
<Button intent="primary" text="Hello world" />
<Button intent="secondary" text="Hello world" />
<Button intent="tertiary" text="Hello world" />
</div>
<div data-hatch-theme="dark" style={{ display: 'grid', gap: 8, background: 'var(--hdc-navy-1000)', padding: 24 }}>
<Button intent="primary" text="Hello world" />
<Button intent="secondary" text="Hello world" />
<Button intent="tertiary" text="Hello world" />
</div>
<div style={{ display: 'grid', gap: 8, background: 'var(--hdc-neutral-300)', padding: 24 }}>
<Button intent="primary" text="Hello world" />
<Button intent="secondary" text="Hello world" />
<Button intent="tertiary" text="Hello world" />
</div>
</Columns>

Layout considerations

By default buttons will span the full width of their container

Share
Code Editor
<Stack >
<Button intent="primary" text="Hello world" />
<Button intent="secondary" text="Hello world" />
</Stack>

It's easy to use CSS grid layout, or a component's abstraction to align

Share
Code Editor
<Columns align={{ x: 'start' }}>
<Button intent="primary" text="Hello world" />
<Button intent="secondary" text="Hello world" />
</Columns>