Button
A button styled by the SDK's stylesheet, with an optional leading icon.
@internote/canvas-sdk/reactimport { 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.
activeWhether the button shows as pressed, on the secondary background.
booleaniconA built-in icon name, or any element, drawn before the children.
BuiltinIconName | React.ReactElementiconOnlyWhether the padding is square, for a button holding only an icon.
booleanvariantThe ground: the bordered surface, the accent colour, or transparent.
defaultprimaryghostDefault
'default'#Example
<Button icon="play" iconOnly aria-label="Play" />Declared in packages/canvas-sdk/src/react/chrome/Button.tsx:34.