# Icon

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/icon
- **Markdown:** https://refast.fastapicloud.dev/docs/components/icon.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/utility/icon.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

The `Icon` component renders Lucide icons by name. It supports custom sizing, coloring, and stroke weights.

```python
from refast.components import Icon

# Simple icon
Icon("home")

# Custom size and color
Icon("settings", size=24, color="blue")
```

```python
Icon("home", size=48)
```

## Available Icons

Total: 250 icons available

Click an icon card to copy code

### Navigation (20)

home

menu

chevron-left

chevron-right

chevron-up

chevron-down

chevrons-left

chevrons-right

chevrons-up

chevrons-down

arrow-left

arrow-right

arrow-up

arrow-down

arrow-up-right

arrow-down-left

corner-up-left

corner-up-right

move

external-link

### Actions (20)

plus

minus

x

check

edit

edit-2

edit-3

trash

trash-2

save

copy

clipboard

clipboard-check

paste

cut

undo

redo

refresh-cw

rotate-ccw

rotate-cw

### Files (18)

file

file-text

file-plus

file-minus

file-check

file-x

folder

folder-open

folder-plus

folder-minus

upload

upload-cloud

download

cloud-off

image

video

music

archive

### UI (25)

search

settings

settings-2

sliders

filter

sort-asc

sort-desc

more-horizontal

more-vertical

grip-vertical

grip-horizontal

maximize

minimize

maximize-2

minimize-2

expand

shrink

eye

eye-off

lock

unlock

key

link

link-2

unlink

### Users (8)

user

users

user-plus

user-minus

user-check

user-x

log-in

log-out

### Status (11)

check-circle

check-circle-2

x-circle

alert-circle

info

alert-triangle

loader

loader-2

circle

circle-dot

ban

### Communication (11)

mail

mail-open

send

inbox

message-circle

message-square

bell

bell-off

phone

phone-call

phone-off

### Media (11)

play

pause

stop-circle

skip-back

skip-forward

fast-forward

rewind

volume

volume-1

volume-2

volume-x

### Data (9)

bar-chart

bar-chart-2

line-chart

pie-chart

activity

trending-up

trending-down

database

server

### Layout (10)

layout

layout-grid

layout-list

sidebar

panel-left

panel-right

panel-top

panel-bottom

columns

rows

### Misc (69)

star

heart

thumbs-up

thumbs-down

bookmark

flag

tag

hash

at-sign

calendar

clock

timer

alarm-clock

map

map-pin

navigation

compass

globe

wifi

wifi-off

bluetooth

battery

power

zap

sun

moon

cloud

umbrella

thermometer

droplet

wind

code

terminal

github

gitlab

package

box

shopping-cart

shopping-bag

credit-card

dollar-sign

percent

gift

truck

printer

camera

mic

headphones

monitor

smartphone

tablet

laptop

watch

tv

cpu

hard-drive

shield

shield-check

award

target

crosshair

layers

square

circle

triangle

hexagon

octagon

help-circle

life-buoy

### Additional icons (19)

rocket

grid-3x3

mouse-pointer-click

route

radio

palette

component

type

text-cursor-input

table

bar-chart-3

wrench

hammer

puzzle

paintbrush

hand-metal

check-square

layout-dashboard

keyboard

### AI & ML (3)

brain

bot

sparkles

### Productivity & Business (5)

briefcase

graduation-cap

list-todo

scale

presentation

### Fintech (2)

coins

wallet

### Developer & Code (3)

bug

code-2

braces

### General UI / Utilities (6)

lightbulb

history

fingerprint

flame

gauge

heart-handshake

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `name` | `str` | *(required)* | Lucide icon name (e.g. `"home"`, `"settings"`) or emoji fallback. |
| `size` | `int` | `16` | Icon height and width in pixels. |
| `color` | `str \| None` | `None` | CSS color value (e.g. `"red"`, `"#ff0000"`, `"currentColor"`). |
| `stroke_width` | `float` | `2.0` | Thickness of the icon stroke lines. |
| `class_name` | `str` | `""` | Extra Tailwind classes applied to the icon. |
| `style` | `dict \| None` | `None` | Inline CSS style dictionary. |

---

## Emojis / Fallback Text

If the provided name is not a valid Lucide icon name, the component will render it as plain text (perfect for emojis like `"🏠"` or `"⚙️"`).

```python
Icon("🏠", size=24)
```

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
