Skip to main content

IconProps

Props for Icon.

This is an interface exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import type { IconProps } from "@mapcairn/map";

interface IconProps extends Omit<SVGProps<SVGSVGElement>, "ref" | "children">

Properties​

filled​

readonly filled?: boolean;

Draws the icon solid, as for a heart; every other icon uses the one regular weight.

icon​

readonly icon: IconComponent;

The icon component to draw, for example MagnifyingGlass from @phosphor-icons/react.

label​

readonly label?: string;

An accessible name. Give one only when the icon is the sole content of something; the icon then becomes role="img". Without it the icon is hidden from assistive technology.

mirrorInRtl​

readonly mirrorInRtl?: boolean;

Flips the icon when the page reads right to left. Set it on an icon that points along the reading direction, such as a back arrow or a next chevron; leave it off for one that does not.

spinning​

readonly spinning?: boolean;

Rotates the icon continuously. Stops under prefers-reduced-motion.

See also​

Source: packages/map/src/ui/Icon/Icon.tsx:24