Icon

Lucideアイコンをラップし、標準化されたサイズとスタイリングでカスタムSVGアイコンをサポートする柔軟なアイコンコンポーネント。

例

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

使い方

アイコンを指定するにはnameプロパティを使用し、カスタムスタイリングにはclassを使用します。

基本的な使い方

スタイル付き

ツートーンとカラフル

ユーティリティクラスを使用して色を指定し、カラフルなアイコンをレンダリングします。

カスタムアイコン

カスタムSVGアイコンを使用するには、public/iconsディレクトリに配置します。

astro

APIリファレンス

プロパティ
説明
タイプ
デフォルト

name

Lucideアイコンの名前またはカスタムSVGファイル名(例:custom.svg) string -

size

アイコンのサイズ(幅と高さ) number | string 24

color

アイコンの色(通常はcurrentColor) string 'currentColor'

strokeWidth

アイコンのストローク幅(Lucideアイコン用) number | string 2

class

カスタムスタイリングのための追加のCSSクラス string -