Skip to content
Docs
Components
Primitives
Icon

Icon

Icon is the base svg primitive for creating accssible icons.

Imports

import { Icon, createIcon } from "@adaptui/react-tailwind";

Usage

If no children is provided Icon will render a fallback icon.

createIcon utility

To create icons more easily we provide a createIcon utility which takes few props and returns a React component;

All icons

API Reference

Icon

Prop

Type

Default

asstring | React.ElementTypesvg

createIcon

Prop

Type

Default

viewBoxstring0 0 24 24
pathReact.ReactElement | React.ReactElement[]-
dstring-
displayNamestring-
defaultPropsPropsWithAs<IconProps, "svg">-
Last updated on July 25, 2022