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 |
---|---|---|
as | string | React.ElementType | svg |
createIcon
Prop | Type | Default |
---|---|---|
viewBox | string | 0 0 24 24 |
path | React.ReactElement | React.ReactElement[] | - |
d | string | - |
displayName | string | - |
defaultProps | PropsWithAs<IconProps, "svg"> | - |
Last updated on June 6, 2023