Skip to content
v2.5.0
English
Русский
Documentation

Icon

Icon is the shared SVG wrapper for VegaUI icons and custom SVG content.

Root Props

PropTypeDefault
sizeIconSize—
Predefined size token for the icon. Can be overridden by explicit width and height.
refRef<SVGSVGElement>—
Ref to the SVG element
strokeWidthnumber—
Stroke thickness for SVG lines and shapes (in px or pt).
childrenReactNode—
Icon content (required). Accepts: icons from ~/icons; custom inline SVG; third-party icon components (e.g. Lucide, Tabler)

Also accepts all HTML attributes.

Child Parts

  • None. Icon is a single exported primitive.

Types

  • IconProps
  • IconSize

State Model

  • Icon has no internal state.
  • Visual changes usually come from parent color or explicit prop changes.