自由組合的樣式

選擇外觀、表面、模式與強調色。

Lyra 的可選樣式層保留穩固的基礎,同時允許將 shadcn、Material 等外觀與表面預設組合。主題設定還涵蓋字型、圓角、層次、圖表配色、對比度和動態效果偏好。

範例

匯入基礎主題和一種可選外觀,再將其應用到指定範圍。

import '@aceshooting/lyra-ui/theme.css';
import '@aceshooting/lyra-ui/looks/shadcn.css';
import '@aceshooting/lyra-ui/surfaces/glass.css';
import { setLyraStyle } from '@aceshooting/lyra-ui/theme.js';

setLyraStyle({ look: 'shadcn', surface: 'glass', mode: 'system',
  accent: 'emerald', density: 'comfortable' });

瀏覽元件 · 閱讀指南(英文)