Skip to Content
Documentation
Saas UI
Get Pro
Getting started
Components
Overview

Icon

Used to display an svg icon

SourceStorybook

Anatomy

import { Icon } from '@saas-ui/react/icon'
<Icon as={LuUser} />

<Icon><User /></Icon>
warning
When rendering an icon as a child, the component needs to have a ref forwarded.

Built-in Icons

Saas UI uses Lucide icons by default, but you can use any icon library.

import { ChevronUpIcon } from '@saas-ui/react/icons'

Examples

React Icons

Integrate with popular react icon libraries like react-icons

Custom svg

Use the asChild prop to render custom svg icons within the Icon component

Create Icon

Use the createIcon utility to create custom icons

Previous

Hover Card

Next

Icon Badge