Icon

A glyph in a span, drawn in the current text colour at the current font size.

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

A glyph element is drawn as given; otherwise name picks one of the built-in 24×24 paths, and with neither the span holds an empty SVG. The built-in SVG is hidden from screen readers, so an icon that carries meaning needs an aria-label.

#Props

Also takes className. Any other prop is passed to the rendered element.

aria-label
The accessible name, set on the wrapping span.
string
glyph
Any element to draw instead of a built-in glyph; wins over name.
React.ReactElement
name
One of the SDK's built-in glyphs.
playpausecheckrestartloopnextprevfullscreenexit-fullscreencopy
size
The icon's size, as a font size: a number is pixels, a string any CSS length.
number | string
Default'1em'

Declared in packages/canvas-sdk/src/react/chrome/Icon.tsx:62.

Last updated