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"

Used By Components & Hooks

  • Accordion
  • Alert
  • Autocomplete
  • Avatar
  • Blockquote
  • Breadcrumb
  • Calendar
  • Carousel
  • Checkbox
  • CheckboxCard
  • CloseButton
  • ColorPicker
  • ColorSelector
  • DatePicker
  • Loading
  • Menu
  • NativeAccordion
  • NativeSelect
  • NumberInput
  • Pagination
  • PasswordInput
  • Rating
  • Reorder
  • Select
  • Stat
  • Steps
  • Table
  • Tag
  • Tip

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.