Usage

Add an image text alternative to convey this component’s purpose.

import { IconButton } from '@loomhq/lens/icons'
import { SvgFolder } from '@loomhq/lens/icons'
<IconButton altText="Move to Folder" icon={<SvgFolder />} />

HTML tag

Change the HTML wrapper tag with the htmlTag prop. The default tag is <button>. Use href when using htmlTag="a".

Sizes

Icon

See the Icon set.

Active

Disabled

Color

Use one of the palette colors.

Forwarding refs

Use the ref prop to access the DOM node.

Props

name
type
default
iconColor
string
'body'
size
'small' | 'medium' | 'large'
'medium'
htmlTag
'button' | 'a'
'button'
altText
string
required
icon
React.ReactNode
onClick
React.MouseEventHandler<HTMLInputElement>
backgroundColor
string
isActive
boolean
isDisabled
boolean
href
string
target
string