Usage

import { Icon, SvgSmile } from '@loomhq/lens'
<Icon icon={<SvgSmile />} />

Icon

See the Icon set.

Color

Use one of the pallete colors.

Size

The default size is 3×3 units (1.5rem × 1.5rem), To change it use the size prop, the value can be specified in units, pixels or any valid css unit.

With alternative text

If the icon is not purely decorative, add an image text alternative for accessibility reasons.

Width offset

Use hasWidthOffset to offset the extra white space created by the icon boundary.

Without offset — icon has extra white space
Granularization of Incoming Signals
With offset — extra white space is compensated
Granularization of Incoming Signals

Props

name
type
default
color
string
'body'
size
string | number
3
altText
string
icon
React.ReactNode
hasWidthOffset
boolean