Component Statesのロゴ

Component States

組織
KyaniteLabs
component-states

インタラクティブなUIの状態マトリクスです。ホバー、フォーカス、アクティブ、無効、読み込み中、選択済み、エラー、キーボード、ARIAの各状態が必要なボタン、リンク、入力欄、タブ、トグル、メニュー、カード、コントロールの構築やレビューに使います。

Add to TypingMind

概要

公開者KyaniteLabs
リポジトリtastecheck
スキル名component-states
スター
10
フォーク
7
同梱ファイル
4
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    KyaniteLabsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Component States」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/KyaniteLabs/tastecheck/tree/main/skills/component-states
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/KyaniteLabs/tastecheck.git /tmp/tastecheck
mkdir -p .claude/skills
cp -r /tmp/tastecheck/skills/component-states .claude/skills/component-states
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでComponent Statesを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にComponent Statesを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Component Statesは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Component States

An interactive control is a lifecycle, not a resting style. Map applicable states to semantics, visible treatment, and recovery.

Decision order and evidence

  1. Name role, interaction model, owner, and applicable states.
  2. Give each state ARIA/DOM mapping, visible non-color treatment, trigger, and recovery.
  3. Test keyboard, focus-visible, contrast, reduced motion, and async completion.

Report one evidence row per state; n/a needs a subject-absence reason. Hand field validation to form-ux, emptiness to empty-states, and missing tokens back as gaps, never fallbacks.

Async/destructive controls

Name one semantic owner; visual states only present its lifecycle.

State / eventGuard and observable contract
ready / invokeClick, Enter, Space, and script use one route; accepted work creates a request key.
confirmingUse only for irreversible/broad/cascading work; name consequence, move focus in, restore invoker on cancel.
submittingCreate key before dispatch; reject duplicates; expose disabled/busy and working label.
matching completionOnly matching key settles work; stale results cannot clear busy, alter target, or move focus.
success / failureRecord data first; confirm locally and choose focus, or retain context with nearby error/retry/cancel.

Test real and stale/failed completion. If success empties a region, hand it to empty-states.

State matrix

Account for these states where applicable:

StateTriggerMust communicateCSS
Defaultrest"this is here / interactive"base styles
Hoverpointer over"you can interact" (pointer devices only):hover
Focuskeyboard tab / programmatic"this is where you are" (keyboard):focus-visible
Active / pressedduring click/tap"your action registered":active
Disablednot available"not available, and why":disabled / [aria-disabled]
Loadingasync in progress"working, wait"a data-loading / aria-busy class
Selected / currentchosen / active page"this is the active one"[aria-selected]/[aria-current]
Error / invalidfailed validation"something's wrong here"[aria-invalid]

The first five baseline any control; add selected and error where applicable.

Non-negotiables

  • Never ship default-only: applicable states need semantics and non-color signals.
  • Never remove a focus outline without an equally visible replacement; hover is not focus.
  • Explain unavailability; a silent disabled submit is a form-ux failure.
  • Async controls prevent duplicate dispatch, expose busy state, and preserve contrast (≥3:1 UI, ≥4.5:1 text); feedback is fast and reduced-motion-safe.

Implementation starter

Read assets/states-starter.css for tokenized CSS/reduced-motion details. A missing token is a gap, never a fallback hex; add the request guard before styling async work.

State by component

  • Button/link: default, hover, focus-visible, active, disabled/loading as applicable; toggles use aria-pressed; links retain non-color/visited cues.
  • Toggle / switch: use role="switch" (not role="checkbox") with aria-checked; Space toggles, Tab moves focus. Example: <button role="switch" aria-checked="true">Notifications</button>. Screen readers announce "switch, on/off" instead of "checkbox, checked."
  • Fields: focus, disabled, filled/readonly, error, selected/open/checked states; style a correctly labelled focusable input (form-ux owns validation).
  • Navigation/list/menu: current/selected uses aria-current/aria-selected; pointer and keyboard focus are equally legible.
  • Overlays: model open/closed and entry/exit; prefer native Popover/<dialog>; toasts use role="status"; hover-only content remains focus-reachable.

Reference files

  • references/states.md — state semantics, pitfalls, ARIA pairings.
  • references/decision-records.md — novel-case ADR rules.

Self-check (per interactive element)

For each applicable state, confirm visible focus, semantics, non-color contrast, and reduced-motion behavior. For async/destructive work confirm owner, guard, justified confirmation, duplicate prevention, recovery, and final focus; exercise real and stale/ failed completion separately. Do not collapse controls into one checkmark.

How to deliver

Deliver applicable matrix and lifecycle evidence. Pair with form-ux, empty-states, micro-motion, a11y-pass, and color-system at their boundaries.

Contract (generated)

Canonical detail: contract.json.

  • Route: A control has interaction states missing or inconsistent with its semantics. (+1 in contract.json); avoid: The request is only about form copy or validation timing. (+1 in contract.json)
  • Exclude: Do not invent page-level empty states or validation policy. (+2 in contract.json)
  • Stop / handoff: Stop when the component semantics or interactive states cannot be identified. (+2 in contract.json); receives [design-system-interview, empty-states, improve-existing-website, responsive-layout, spacing-system, tasteroll, theming] -> sends [form-ux, empty-states, a11y-pass, micro-motion, tastecheck-pass]
  • Output: component lifecycle contract and implementation guidance
  • Evidence: table_with_evidence with status, reason, remediation, evidence, provenance.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Component States」では何ができますか?

インタラクティブなUIの状態マトリクスです。ホバー、フォーカス、アクティブ、無効、読み込み中、選択済み、エラー、キーボード、ARIAの各状態が必要なボタン、リンク、入力欄、タブ、トグル、メニュー、カード、コントロールの構築やレビューに使います。

TypingMindでComponent Statesを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Component Statesはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにComponent Statesをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/KyaniteLabs/tastecheck/tree/main/skills/component-statesを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Component Statesを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Component Statesで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもComponent Statesを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Component States」は無料ですか?

はい。KyaniteLabsがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇