Skip to main content

IIconProps

@spartanfx/react v1.2.2


@spartanfx/react / index / IIconProps

Interface: IIconProps

Props for Icon. Extends the native <svg> attributes so callers can pass onClick, aria-*, data-*, style, etc. straight through. *

Extends

  • SVGAttributes<SVGSVGElement>

Properties

Required

PropertyTypeDescription
namestringName of the in-house glyph to render (see SpartanIconName). Accepts any string for call sites that pass through Fluent-style iconName values; an unknown name renders nothing so layout never breaks.

Options

PropertyTypeDescription
size?string | numberWidth/height of the glyph. A number is treated as pixels. Defaults to '1em' so the icon scales with the surrounding font-size — matching how the old Fluent icon FONT behaved.
title?stringAccessible name. When provided the SVG is exposed as an image (role="img" + <title>); when omitted the icon is decorative and hidden from assistive tech (aria-hidden).

+ 468 inherited members. standard HTML/ARIA attributes (e.g. className, onClick, aria-*) are also accepted but omitted here for clarity.