Menu

API Reference

View as Markdown

@kovojs/icons

Generated from 1 public subpath — 1 exports, 1 documented. Do not edit by hand.

@kovojs/icons#

Task: Shared icon props for the per-icon SVG component subpaths.

Source: packages/icons/src/index.tsx

Supporting types#

IconProps#

Props accepted by every @kovojs/icons icon. Size and color are controlled through the StyleX style channel — set width/height to size and color to tint (the stroke uses currentColor); there is no size prop. Icons render decorative (aria-hidden="true") unless given an aria-label/title, which promotes them to role="img". See SPEC.md §3 (ARIA author-wins) and §4.6 (attribute merge).

Signature

ts
interface IconProps {
  /** StyleX style applied to the root `<svg>`: `width`/`height` size it, `color` tints it. */
  style?: style.StyleInput;
  /** Extra class name, concatenated after the StyleX-generated class (SPEC.md §4.6). */
  class?: string;
  /** `id` forwarded to the root `<svg>` for targeting (there is no React `ref`; SPEC.md §4.5). */
  id?: string;
  /** Accessible name; when set (or `title`) the icon is exposed as `role="img"` instead of decorative. */
  'aria-label'?: string;
  /** Tooltip / accessible title; also promotes the icon from decorative to `role="img"`. */
  title?: string;
  /** Explicit ARIA role override (author-wins, SPEC.md §3). */
  role?: string;
  /** Forwarded ARIA state / relationship attributes. */
  [ariaAttr: `aria-${string}`]: unknown;
  /** Forwarded `data-*` attributes. */
  [dataAttr: `data-${string}`]: unknown;
}