@antadesign/anta
    Preparing search index...

    Interface IconPropsUnreviewed

    Common props for JSX component wrappers.

    interface IconProps {
        shape: keyof IconShapes;
        size?: number;
        label?: string;
        className?: string;
        style?: CSSProperties;
        children?: ReactNode;
        id?: string;
        title?: string;
        slot?: string;
        tabIndex?: number;
        key?: string | number | null;
        [key: `data-${string}`]: unknown;
        [key: `aria-${string}`]: unknown;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: `data-${string}`]: unknown

      Any data-* attribute is forwarded to the rendered element.

    • [key: `aria-${string}`]: unknown

      Any aria-* attribute is forwarded to the rendered element.

    Index
    shape: keyof IconShapes

    Which icon to render. The set of valid shapes comes from Anta's built-in icons plus any consumer-generated shapes (via the IconShapes interface module augmentation).

    size?: number

    Width and height in pixels.

    16
    
    label?: string

    Accessible name for the icon. When set, the wrapper exposes role="img" and aria-label={label} so screen readers announce the icon. When omitted (the default), the icon is treated as decorative — aria-hidden="true" is applied so it doesn't add noise alongside neighbouring text.

    className?: string

    Adds CSS classes to the root element and preserves its existing classes.

    style?: CSSProperties

    Inline CSS styles on the root element.

    children?: ReactNode

    Content to render in place of any default content.

    id?: string

    HTML id attribute.

    title?: string

    HTML title attribute, shown as a browser tooltip on hover.

    slot?: string

    Named slot in a parent web component, such as slot="header" in a <Dialog>.

    tabIndex?: number

    Tab order. Set to -1 to skip the element when tabbing.

    key?: string | number | null

    React/Preact reconciliation key when rendered inside a list. Consumed by the JSX runtime (not forwarded as a DOM attribute).