lytenyte-grid
Use this skill when the user is working with LyteNyte Grid (@1771technologies/lytenyte-pro or @1771technologies/lytenyte-core), a headless React data grid. Activate for tasks like: installing or licensing the grid, configuring columns or rows, building cell renderers or editors, adding filters or sort controls, grouping or aggregating rows, pivoting, exporting to CSV/Excel/Parquet/Arrow, row selection, cell range selection, theming or styling, TypeScript GridSpec patterns, server-side or tree data, and any PRO component (SmartSelect, PillManager, Menu, Dialog, TreeView, RowGroupCell). Also activate when the user describes grid problems without naming the package — e.g. "my rows won't group", "cells aren't editable", "add a loading overlay", "pin this column", "the filter isn't working", "how do I export this table", "select a range of cells", "copy cells to clipboard".
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o lytenyte-grid.zip https://jpskill.com/download/6046.zip && unzip -o lytenyte-grid.zip && rm lytenyte-grid.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6046.zip -OutFile "$d\lytenyte-grid.zip"; Expand-Archive "$d\lytenyte-grid.zip" -DestinationPath $d -Force; ri "$d\lytenyte-grid.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
lytenyte-grid.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
lytenyte-gridフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] lytenyte-grid LyteNyte Grid は、ヘッドレスな React データグリッドで、2つのエディションがあります。
- Core —
@1771technologies/lytenyte-core(Apache 2.0、無料、ライセンス不要) - PRO —
@1771technologies/lytenyte-pro(商用、Core のスーパーセット)
PRO ライセンス: PRO は評価目的で自由にインストールして使用できます。試用にはライセンスキーは不要です。キーが設定されていない場合、「used for evaluation」という透かしが表示されます。本番環境でのデプロイで透かしを削除するには、ライセンスキーが必要です。ライセンス認証はオフラインで行われ、ネットワークリクエストは発生しません。ユーザーが構築/プロトタイプ作成中で、まだライセンスを設定していない場合でも問題ありません。出荷前にライセンスを追加できます。
クイックスタート
// または、すでにインストールされている場合は @1771technologies/lytenyte-core
import { Grid, useClientDataSource } from "@1771technologies/lytenyte-pro";
import "@1771technologies/lytenyte-pro/grid-full.css";
interface GridSpec {
readonly data: { name: string; price: number };
}
function MyGrid() {
const ds = useClientDataSource({ data: myData });
const [columns, setColumns] = useState<Grid.Column<GridSpec>[]>([
{ id: "name", name: "Name" },
{ id: "price", name: "Price", type: "number" },
]);
return (
<div className="ln-light ln-grid" style={{ height: 500 }}>
<Grid<GridSpec> rowSource={ds} columns={columns} onColumnsChange={setColumns} rowHeight={40} />
</div>
);
}
注意点
useStateやその他のローカルで作成された状態は、ユーザーがスクロールして仮想化によって行が削除されるとクリアされます: 状態を React コンテキストにリフトするか、apiExtensionを提供してください。- すべての非プリミティブな props をメモ化してください:
columns、columnBase、events、apiExtensionなどは安定した参照である必要があります (useMemo/useCallbackを使用するか、React Compiler を使用してください)。インラインオブジェクトはグリッドの完全な再レンダリングを引き起こします。 - ピボットには
ds.usePivotProps()が必要です —useClientDataSourceをpivotMode: trueで呼び出すだけでは不十分です。<Grid />にds.usePivotProps()をスプレッドしないと、グリッドはピボット列をレンダリングしません。 - サーバーソース:
queryKeyの変更 = 完全なリセット —queryKeyにソート/フィルターモデルを入れると、グリッドはロードされたすべてのデータを破棄し、行 0 から再開します。これは意図的なもので、再フェッチをトリガーするために使用してください。 - RTL には
rtlprop が必要です — グリッドは CSS のdirectionプロパティから RTL を検出しません。<Grid rtl />を明示的に設定してください。 - CSP には
style-src 'unsafe-inline'が必要です — LyteNyte Grid はレイアウト/仮想化のためにインラインスタイルを使用します。ほとんどのモダンフレームワーク (Vite、Next.js) はすでにこれを含んでいます。 - カラム
idは不変です — 作成後にカラムのidを変更しないでください。これはグリッド全体で安定したキーとして使用されます。 - リアクティブな拡張状態には
usePieceを使用してください —apiExtensionを介してリアクティブな状態 (例: フィルターモデル) を公開するには、usePiece(value, setter)でラップしてください。拡張オブジェクト内のプレーンな値はリアクティブではありません。 - コンテキストメニュー: ブラウザのデフォルトを抑制してください —
contextmenuハンドラでは常にevent.preventDefault()とevent.stopPropagation()を呼び出してください。そうしないと、ブラウザのメニューがあなたのメニューの上に表示されます。 - ポップオーバーエディタ:
editOnPrintableを無効にしてください — 編集レンダラーが文字キー (例: SmartSelect) を使用する場合、グリッドがキー入力ごとに編集モードに入るのを防ぐために、カラムにeditOnPrintable: falseを設定してください。 - グリッドコンテナにはサイズが定義されている必要があります —
<Grid />コンポーネントは親の 100% を埋めます。親に明示的な高さがない場合、グリッドは高さゼロでレンダリングされ、空白に見えます。常に固定ピクセル高を設定するか、flex: 1を使用したフレックス/グリッドレイアウトを使用してください。 - CSS のインポートはオプションですが、組み込みテーマには必須です — LyteNyte Grid は設計上ヘッドレスです。CSS をインポートしない場合、グリッドは機能的にはレンダリングされますが、組み込みスタイルはありません。ヘッドレスモード、Tailwind、CSS Modules、または Emotion を介して独自のスタイルを提供する必要があります。組み込みテーマまたはデフォルトのスタイリングが必要な場合にのみ CSS をインポートしてください。
columnsには常にonColumnsChangeが必要です — これを省略すると、ユーザーが行ったカラムのリサイズ、並べ替え、ソート状態の変更はサイレントに破棄されます。グリッドはカラムの変更を永続化するためにsetColumnsを呼び出す必要があります。
主要なパターン
GridSpec— グリッドごとに一度定義します:interface GridSpec { readonly data: MyType }。すべての型を駆動します。- すべてのフィルターはカスタム述語です —
(row: RowLeaf<T>) => boolean。組み込みのフィルター UI はありません。 apiExtension— グリッド API にカスタムメソッド/状態を追加します。拡張機能がグリッド API メソッドを呼び出す必要がある場合は、関数形式(api) => ({...})を使用してください。
必要に応じて参照をロードする
タスクが必要な場合にのみ参照ファイルを読み込みます。すべてのファイルを事前に読み込まないでください。
| タスクが関係する場合… | このファイルを読み込みます |
|---|---|
| インストール、ライセンス、CSS インポート、CDN、透かしエラー | refs/installation.md |
グリッドのセットアップ、コンテナのサイズ設定、リアクティビティ、API リファレンス、apiExtension、usePiece、ヘッドレスモード、イベントシステム (cell/row/viewport イベント) |
refs/grid-core.md |
TypeScript、GridSpec、レンダラー型、RowNode 型ガード |
refs/typescript.md |
カラム — id/name/field、サイズ設定、ピン留め、グループ、ヘッダーレンダラー、スパン |
refs/columns.md |
| 行 — 高さ、マスター-ディテール (行の詳細 |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
LyteNyte Grid is a headless React data grid with two editions:
- Core —
@1771technologies/lytenyte-core(Apache 2.0, free, no license required) - PRO —
@1771technologies/lytenyte-pro(commercial, superset of Core)
PRO licensing: PRO can be installed and used freely for evaluation — no license key is needed to try it. A watermark ("used for evaluation") appears when no key is set. A license key is required to remove the watermark for production deployments. License validation is offline; no network request is made. If the user is building/prototyping and hasn't set up a license yet, that is fine — they can add it before shipping.
Quick Start
// or @1771technologies/lytenyte-core if already installed
import { Grid, useClientDataSource } from "@1771technologies/lytenyte-pro";
import "@1771technologies/lytenyte-pro/grid-full.css";
interface GridSpec {
readonly data: { name: string; price: number };
}
function MyGrid() {
const ds = useClientDataSource({ data: myData });
const [columns, setColumns] = useState<Grid.Column<GridSpec>[]>([
{ id: "name", name: "Name" },
{ id: "price", name: "Price", type: "number" },
]);
return (
<div className="ln-light ln-grid" style={{ height: 500 }}>
<Grid<GridSpec> rowSource={ds} columns={columns} onColumnsChange={setColumns} rowHeight={40} />
</div>
);
}
Gotchas
useStateand other locally created state are cleared when the user scrolls and rows are removed by virtualization: Lift state into a React context or provide anapiExtension.- Memoize all non-primitive props:
columns,columnBase,events,apiExtension, etc. must be stable references (useuseMemo/useCallback) or use the React Compiler. Inline objects cause full grid re-renders. - Pivoting requires
ds.usePivotProps()— callinguseClientDataSourcewithpivotMode: trueis not enough. You must also spreadds.usePivotProps()onto<Grid />or the grid will not render pivot columns. - Server source:
queryKeychange = full reset — putting a sort/filter model inqueryKeycauses the grid to discard all loaded data and restart from row 0. This is intentional; use it to trigger refetches. rtlprop required for RTL — the grid does NOT detect RTL from the CSSdirectionproperty. Set<Grid rtl />explicitly.- CSP requires
style-src 'unsafe-inline'— LyteNyte Grid uses inline styles for layout/virtualization. Most modern frameworks (Vite, Next.js) already include this. - Column
idis immutable — never change a column'sidafter creation. It is used as a stable key throughout the grid. usePiecefor reactive extension state — to expose reactive state throughapiExtension(e.g., a filter model), wrap it inusePiece(value, setter). Plain values in the extension object are not reactive.- Context menu: suppress browser default — always call
event.preventDefault()andevent.stopPropagation()incontextmenuhandlers, or the browser menu appears over yours. - Popover editors: disable
editOnPrintable— if your edit renderer uses character keys (e.g., a SmartSelect), seteditOnPrintable: falseon the column to prevent the grid from entering edit mode on every keypress. - The grid container must have a defined size — the
<Grid />component fills its parent 100%. If the parent has no explicit height, the grid renders with zero height and appears blank. Always set a fixed pixel height, or use a flex/grid layout withflex: 1. - CSS import is optional but required for the prebuilt themes — LyteNyte Grid is headless by design. If you don't import the CSS, the grid renders functionally but with no built-in styles; you must supply your own via headless mode, Tailwind, CSS Modules, or Emotion. Only import the CSS if you want a prebuilt theme or the default styling.
columnsalways needsonColumnsChange— omitting it means column resizes, reorders, and sort-state changes made by the user are silently discarded. The grid needs to callsetColumnsto persist any column mutation.
Key Patterns
GridSpec— define once per grid:interface GridSpec { readonly data: MyType }. Drives all types.- All filters are custom predicates —
(row: RowLeaf<T>) => boolean. No built-in filter UI. apiExtension— adds custom methods/state to the grid API. Use function form(api) => ({...})when the extension needs to call grid API methods.
Load References On Demand
Read a reference file only when the task requires it. Do not load all files upfront.
| When the task involves… | Load this file |
|---|---|
| Installing, licensing, CSS imports, CDN, watermark errors | refs/installation.md |
Grid setup, container sizing, reactivity, API ref, apiExtension, usePiece, headless mode, events system (cell/row/viewport events) |
refs/grid-core.md |
TypeScript, GridSpec, renderer types, RowNode type guards |
refs/typescript.md |
Columns — id/name/field, sizing, pinning, groups, header renderers, spanning |
refs/columns.md |
| Rows — height, master-detail (row detail), full-width rows, row spanning, row drag | refs/rows.md |
Row selection — checkboxes, SelectAll, linked vs isolated, controlled state |
refs/row-selection.md |
Client-side data — useClientDataSource, sort, filter, group, aggregation, pivot, add/delete rows |
refs/client-data-source.md |
Server-side data — useServerDataSource, DataRequest/DataResponse, loading state, refresh |
refs/server-data-source.md |
Tree data — useTreeDataSource, nested objects, rowRootFn/rowChildrenFn |
refs/tree-data-source.md |
| Infinite scroll or pagination on server data | refs/infinite-paginated-source.md |
Cell renderers, tooltips, diff flashing, virtualization warning, cell range selection (cellSelectionMode, cellSelections, multi-range, clipboard) |
refs/cells.md |
| Cell editing — edit mode, validators, edit renderers, bulk edit | refs/cell-editing.md |
| Filtering — text, number, date, set, quick search filter patterns | refs/filtering.md |
Expression DSL — Evaluator, ExpressionEditor, expression filters |
refs/expressions.md |
Pivoting — pivotMode, PivotModel, measures, grand totals |
refs/pivoting.md |
| Exporting data — CSV, Excel, Parquet, Arrow, clipboard | refs/export.md |
UI components — SmartSelect, Menu, Popover, Dialog, PillManager, ColumnManager, TreeView, RowGroupCell, overlays, ViewportShadows |
refs/components.md |
Theming — pre-built themes, data-ln-* attributes, CSS tokens, Tailwind, CSS Modules, Emotion |
refs/theming.md |
shadcn/ui — CLI install, ln-shadcn theme, using shadcn components as renderers/editors/filters, dark mode, cn utility |
refs/shadcn.md |
| Keyboard shortcuts, RTL, accessibility, React Compiler, bundling, security, versioning | refs/misc.md |