Icon

A flexible icon component that wraps Lucide icons and supports custom SVG icons with standardized sizing and styling.

Examples

star
menu
search
arrow-right
check
x
alert-circle
info
user
settings
house
mail
bell
camera
heart
trash
edit
copy
share
download
upload
link
external-link
calendar
clock
map-pin
phone
message-square
plus
minus
chevron-left
chevron-right
chevron-up
chevron-down
sun
moon
monitor
smartphone
laptop
database
server
shield
lock
unlock
key
wifi
bluetooth
battery
power
refresh-cw
play
pause
square
circle
triangle
star-half
thumbs-up
thumbs-down
eye
eye-off
user
settings
home
mail
bell
camera
heart
trash
edit
copy
share
download
upload
link
external-link
calendar
clock
map-pin
phone
message-square
plus
minus
chevron-left
chevron-right
chevron-up
chevron-down
sun
moon
monitor
smartphone
laptop
database
server
shield
lock
unlock
key
wifi
bluetooth
battery
power
refresh-cw
play
pause
square
circle
triangle
star-half
thumbs-up
thumbs-down
eye
eye-off

How to use

Use the name prop to specify the icon, and use class for custom styling.

Basic usage

Styled

Two-tone and colorful

Specify colors using utility classes to render colorful icons.

Custom icon

Use custom SVG icons by placing them in the public/icons directory.

astro

API Reference

Property
Description
Type
Default

name

Name of the Lucide icon or custom SVG file name (e.g., custom.svg) string -

size

The size of the icon (width and height) number | string 24

color

Color of the icon (usually currentColor) string 'currentColor'

strokeWidth

Stroke width of the icon (for Lucide icons) number | string 2

class

Additional CSS classes for custom styling string -