「機能グリッド」は Pro に含まれます。解除するとプレビューが表示されます。
使い方
import { LandingFeatures } from './LandingFeatures.jsx'
// Your own features: each tile is data; `demo` is any element (or a function of the feature),
// and a tile without one lists its points. Tones: 'accent' | 'secondary' | 'tertiary'.
<LandingFeatures
locale="en"
labels={{ title: 'Brew better coffee', titleQuiet: ' cup after cup.' }}
features={[
{ id: 'log', icon: 'cup', title: 'Log every brew', text: 'Dose, grind and time in one tap.', points: ['Recipes saved', 'Timer built in'] },
{ id: 'taste', icon: 'star', tone: 'tertiary', title: 'Rate the taste', text: 'See what changed.', demo: <TasteChart /> },
]}
/>
// Or keep the four built-in demos of the sample app and feed them your numbers:
<LandingFeatures
locale="en"
schedule={plants} // [{ id, name, from, every: { summer, winter } }]
rooms={rooms} // [{ id, name, value }] humidity in %
journal={entries} // [{ id, date, note, leaves }]
onExplore={(feature, value) => track('feature-demo', { feature, value })}
/>プロパティ
| プロパティ | 型 | 既定値 | 説明 |
|---|---|---|---|
locale | 'en' | 'zh-CN' | 'es' | 'ja' | 'en' | 組み込みの文言とサンプルデータの言語。 |
features | Array<{ id, icon?, title, text, tone?: 'accent' | 'secondary' | 'tertiary', span?: 2 | 3 | 4 | 6, demo?: ReactNode | (feature) => ReactNode | 'season' | 'light' | 'humidity' | 'journal', points?: string[] }> | the four sample demos | タイルの一覧。`demo` は独自の要素か、組み込みデモの名前。demo のないタイルは `points` を並べます。`span` は 6 列のうち何列を使うか(省略時は数に応じて自動)。`icon` は kit のアイコン名。 |
schedule | Array<{ id, name, from, every: { summer, winter } }> | sample plants | リマインダーのデモの植物。最初に水やりする日と、季節ごとの間隔(日数)。 |
rooms | Array<{ id, name, value }> | sample rooms | 湿度のデモの部屋と、その湿度(%)。 |
journal | Array<{ id, date, note, leaves }> | sample entries | 日記の記録。それぞれで絵の植物の葉が `leaves` 枚になります。 |
season / distance | 'summer' | 'winter' / number | 'summer' / 1.5 | 季節と光のデモの初期値。 |
onExplore | (feature, value) => void | — | 訪問者がデモを試したとき(season、light、humidity、journal と選んだ値)。 |
labels | object | — | 組み込みの文言を置き換えます(キーは copy.js と同じ)。 |
className | string | — | ルートの section に追加されます。 |
プロジェクトに追加
Pro にはこのブロックのソース一式が含まれます。指示をコピーしてエージェントに導入を依頼できます。
LandingFeatures.jsxlanding-features.csscopy.jskit.jsxkit.cssui/rolling-number/ui/range-slider/ui/progress-ring/ui/sliding-tabs/tokens.cssREADME.md
ブロック本体、スタイルと文言、共通の kit、使っているコンポーネント、tokens.css が 1 つのフォルダにまとめて入ります。
