Icon
currentColor で描画されるインライン SVG グリフ。アイコンフォントも追加のリクエストも不要です。
対応フレームワーク
Angular: 対応 Vue: 対応 React: 対応 React Native: 対応
使い方
<div class="demo-stack">
<div class="demo-row" style="align-items: flex-end">
<sone-icon icon="sparkles" size="xs" />
<sone-icon icon="sparkles" size="sm" />
<sone-icon icon="sparkles" size="base" />
<sone-icon icon="sparkles" size="lg" />
<sone-icon icon="sparkles" size="xl" />
</div>
<div class="demo-row" style="align-items: center">
<!-- Icons draw in currentColor; give a label only when the icon carries the meaning alone -->
<span style="color: var(--text-secondary)"><sone-icon icon="lock" label="Locked" /></span>
<span style="color: var(--danger)"><sone-icon icon="alert-circle" label="Error" /></span>
</div>
<div class="demo-row" style="align-items: center">
<button soneBtn variant="outline" type="button"><sone-icon icon="plus" inline="start" /> New note</button>
<button soneBtn variant="outline" type="button">Next <sone-icon icon="chevron-right" inline="end" /></button>
<button soneBtn variant="ghost" size="icon" type="button" aria-label="Search"><sone-icon icon="search" /></button>
</div>
</div>インポート
import {
SoneIconComponent,
} from "@surface-one/angular/icon";API リファレンス
SoneIconComponentコンポーネント
| 名前 | 型 | デフォルト |
|---|---|---|
icon必須 | ShellIcon | — |
size | IconSize | null | null |
label | string | null | null |
inline | "start" | "end" | null | null |