@mocanvas/mocanvas · interface

TLUiIconProps

interface TLUiIconProps

The icon element the UI primitives use.

Distinct from Icon, which takes a name the set is known to have. This one takes an arbitrary string, because a TLUiActionItem.icon comes from an app's override and may name artwork mocanvas does not ship: an unknown name falls back to the label's initial rather than rendering an empty box, so a custom item is still a legible button.


Properties · 7

className?: string
color?: string
icon: string

Icon name, or an image URL when it contains a / or ..

invertIcon?: boolean

Mirror horizontally, for a direction icon in a right-to-left locale.

label?: string

Read out when the icon is the button's only content.

small?: boolean

Draw at the smaller size used inside dense rows.

style?: CSSProperties

Mentioned here

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.