Askr documentation
Generated API snapshot

@askrjs/askr/foundations/icon

Exports from the declarations published in @askrjs/askr. Signatures reflect the published artifact.

Exports

This entrypoint publishes 5 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

IconBasetype

IconBase: ({ size, strokeWidth, color, title, class: className, style, iconName, children, ref, ...rest }: IconProps) => JSXElement

Base <svg> wrapper implementing the icon contract; generated icon components render into it.

IconOwnPropstype

IconOwnProps: {
  size?: number | string;
  strokeWidth?: number;
  color?: string;
  title?: string;
  class?: string;
  style?: string | IconStyleObject;
  iconName?: string;
}

Props specific to the icon contract, independent of the underlying <svg> props.

class
class?: string | undefined;
color
color?: string | undefined;
iconName
iconName?: string | undefined;
size
size?: string | number | undefined;
strokeWidth
strokeWidth?: number | undefined;
style
style?: string | IconStyleObject | undefined;
title
title?: string | undefined;

IconPropstype

IconProps: Omit<
  Props,
  | 'children'
  | 'class'
  | 'color'
  | 'height'
  | 'ref'
  | 'role'
  | 'stroke'
  | 'stroke-width'
  | 'style'
  | 'title'
  | 'width'
> &
  IconOwnProps & {
    children?: unknown;
    ref?: Ref<SVGSVGElement>;
  }

Full prop set accepted by {@link IconBase} and generated icon components.

children
children?: unknown;
class
class?: string | undefined;
color
color?: string | undefined;
iconName
iconName?: string | undefined;
ref
ref?: Ref<SVGSVGElement>;
size
size?: string | number | undefined;
strokeWidth
strokeWidth?: number | undefined;
style
style?: string | IconStyleObject | undefined;
title
title?: string | undefined;

IconSizeTokentype

IconSizeToken: 'sm' | 'md' | 'lg' | 'xl'

Named icon size presets, mapped to CSS variables at render time.

IconStyleObjecttype

IconStyleObject: Record<string, unknown>

Camel-cased CSS style object accepted by icon style props.