Icon

Icon is a general icon component that can be used in your projects.

Usage

import { GhostIcon } from "@yamada-ui/react"
<GhostIcon />

You can find all the icons we offer at here.

Using React Icons

When using React Icons, set the component to as.

import { Icon } from "@yamada-ui/react"
import { FaRobot } from "react-icons/fa"
<Icon as={FaRobot} />

Using Lucide lab

When using Lucide lab, use LucideIcon.

import { LucideIcon } from "@yamada-ui/react"

Props

Accessibility

If you set aria-hidden={false} and aria-label on Icon or LucideIcon, it will be read by screen readers.

<Icon as={FaRobot} aria-hidden={false} aria-label="Robot" />

ARIA Roles and Attributes

ComponentRoles and AttributesUsage
Icon, LucideIconrole="img"Indicates that this is an image.
aria-hiddenExcludes the element from the accessibility tree.
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd
2nd