Skip to content
Theme:

Ui3nIcon ​

Icon component for rendering SVG icons with customizable size, color, and transformations.

Props

NameTypeDefaultDescription
idstring | undefined —

Root element id

icon*string —

Icon name

titlestring | undefined""

Icon title

sizestring | number | undefined —

Icon size

widthstring | number | undefined —

Icon width

heightstring | number | undefined —

Icon height

colorstring | undefined —

Icon color

horizontalFlipboolean | undefined —

Flip icon horizontally

verticalFlipboolean | undefined —

Flip icon vertically

rotatenumber | undefined0

Icon rotation in degrees

Events

Event NameArguments / Value TypeDescription
clickvalue: MouseEvent —

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-icon-colorvar(--color-icon-control-primary-default)
--ui3n-icon-height16px
--ui3n-icon-width16px

Usage Examples ​

Basic usage ​

Basic usage

Icon with different sizes using the size prop

Icon colors ​

Icon colors

Customize icon color using the color prop

Custom width and height ​

Custom width and height

Set separate width and height values instead of using size

Transformations ​

Transformations

Flip and rotate icons using horizontalFlip, verticalFlip and rotate props

Click event ​

Click event

Handle click events on the icon

Clicked: 0