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

IconBadge

Used to display an svg icon

SourceStorybook

Anatomy

import { IconBadge } from '#components/ui/icon-badge'
<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 { LuChevronUp } from 'react-icons/lu'

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

Icon

Next

Image