Icons
Lucide 由来の@kkhys/ui/icons/<name>.svgwidthheight / class /aria-* をcurrentColor なのでcolor にviewBox 0 0 24 24、stroke-width 2、stroke currentColor、fill none。
Glyphs 12
Sizes
4 段。widthheightを
12px本文中の記号外部リンク、見出しのアンカー、favicon の代替14pxヘッダーSiteHeader の戻る16pxブロックの先頭Alert、チェックボックス18pxボタンlgtm のコピー・戻る、memo カードUsage
- 使う
- UI の
記号(検索、 戻る、 外部リンク、 コピー、 状態)。 同じ 意味には 同じ glyph。 - 使わない
- ブランドロゴ(各アプリに
置く)、 装飾目的の イラスト、 Lucide 以外の セットとの 混在。 - 配慮
- 装飾は
aria-hidden。アイコンしかない 操作は 親に aria-label。
import SearchIcon from "@kkhys/ui/icons/search.svg";
{/* decorative: the label is the text next to it */}
<a href="/search">
<SearchIcon width={12} height={12} aria-hidden="true" />
検索
</a>
{/* meaningful: the icon is the only content, so the parent names it */}
<button type="button" aria-label="検索">
<SearchIcon width={18} height={18} aria-hidden="true" />
</button>Adding
Lucide のpackages/ui/src/icons/ にdata/icons.ts に
# 1. Lucide から SVG をそのまま置く(24 viewBox、stroke-width 2 のまま)
packages/ui/src/icons/<name>.svg
# 2. 意味と利用先を書く
apps/design/src/data/icons.ts