Button

A button styled by the SDK's stylesheet, with an optional leading icon.

@internote/canvas-sdk/reactComponent
On this page
import { Button } from '@internote/canvas-sdk/react';

It is always type="button", so it never submits a form. Any other button attribute, className included, reaches the button.

#Props

Also takes className, id and style. Any other prop is passed to the rendered element.

active
Whether the button shows as pressed, on the secondary background.
boolean
icon
A built-in icon name, or any element, drawn before the children.
BuiltinIconName | React.ReactElement
iconOnly
Whether the padding is square, for a button holding only an icon.
boolean
variant
The ground: the bordered surface, the accent colour, or transparent.
defaultprimaryghost
Default'default'

#Example

<Button icon="play" iconOnly aria-label="Play" />

Declared in packages/canvas-sdk/src/react/chrome/Button.tsx:34.

Last updated