beam-glow-states
できること
このスキルは、ボーダービーム系のパッケージを使い、ReactアプリのUIの一部に、移動または呼吸するような淡い光を加える作業をAIエージェントに案内します。重いビジュアルを使わず、はっきりした状態の表示が欲しい開発者向けです。
使う場面
- ✓ボタンやカードが、読み込み中、選択中、処理中であることを示すべきとき。
- ✓入力欄、タブ、選択肢に、フォーカス中や現在の状態を示す光が必要なとき。
- ✓AIエージェントのタスクパネルに、控えめに動くハイライトが必要なとき。
スキルのリンク
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/beam-glow-states/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のReactダッシュボードで、処理中のカードの周りに、穏やかに動く光を付けてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはパッケージを導入し、要素をビームのコンポーネントで囲みます。サイズと状態を選びます。アニメーションはオフにできるので、状態は文字と形でも分かるようにします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Beam Glow States
Use the beam as a decorative state accent. Keep the state understandable through text, shape, contrast, and the correct semantic attribute when the animation is absent.
The API below was verified against border-beam 1.3.0. Recheck the official README and exported types when the installed version changes.
Install and import
Install the same package with the repository's package manager:
npm install border-beam
pnpm add border-beam
yarn add border-beam
bun add border-beam
The package requires React and React DOM 18 or newer. It ships ESM, CommonJS, and TypeScript declarations. It injects component-scoped styles, so do not import a separate CSS file.
Prefer the named import:
import { BorderBeam } from "border-beam";
import type {
BorderBeamProps,
BorderBeamSize,
BorderBeamTheme,
BorderBeamColorVariant,
} from "border-beam";
The default component export is also supported:
import BorderBeam from "border-beam";
In a Next.js App Router project, render it from a client component because it uses React state, effects, observers, and animation frames:
"use client";
import { BorderBeam } from "border-beam";
Choose the effect
size |
Motion | Best use |
|---|---|---|
sm |
Compact traveling border | Icon buttons, pills, compact controls |
md |
Full traveling border | Selected cards, current panels, primary active surfaces |
line |
Traveling bottom edge | Search, prompt, input, progress, or command surfaces |
pulse-inner |
Contained breathing glow | Loading cards, processing panels, persistent selected states |
pulse-outside |
Outward breathing halo | One prominent active task or hero control with room to bloom |
Use these defaults by state:
- Loading or processing:
pulse-inner,strength={0.55}to0.75,duration={2.3}to3. - Selected or current:
mdorpulse-inner,strength={0.3}to0.55,duration={3.2}to5. - Focus or short active feedback:
smorline,strength={0.35}to0.6. - High-priority live task:
pulse-outside,strength={0.45}to0.7; allow only one in a view.
Start with colorVariant="mono" for neutral product UI, ocean for cool technical states, sunset for warm urgency, and colorful for a rare high-salience moment.
Start with one mounted wrapper
Keep BorderBeam mounted and toggle active. Removing it when state becomes false skips the built-in fade-out.
<BorderBeam
size="pulse-inner"
colorVariant="ocean"
theme="dark"
strength={0.65}
active={isWorking}
>
<section className="task-card" aria-busy={isWorking}>
<p>{isWorking ? "Generating layout options…" : "Layout options ready"}</p>
</section>
</BorderBeam>
active fades in over 0.6s and fades out over 0.5s. Use onActivate and onDeactivate only when work must align with the completed visual transition.
Wire loading state
Make the loading state truthful before adding the beam:
<BorderBeam
size="pulse-inner"
colorVariant="ocean"
strength={0.65}
active={pending && !reduceMotion}
onDeactivate={() => {
// Optional: advance only after the 0.5s beam exit completes.
}}
>
<section className="beam-surface" aria-busy={pending}>
<span className="status-dot" aria-hidden="true" />
<span>{pending ? "Building preview…" : "Preview ready"}</span>
</section>
</BorderBeam>
- Show a visible status label or progress value; never make the moving edge the only loading cue.
- Avoid showing the beam for operations that finish in roughly
150msor less. - Once shown, keep the loading presentation visible for about
400msto600msto prevent a flash. - Preserve layout between pending and complete states.
- Keep cancellation, retry, and error controls usable. The effect layers already use
pointer-events: none.
Use line when the work belongs to one input or prompt bar. Use pulse-inner when the whole card is busy.
Wire selected or current state
Use the component state and the semantic state together:
<BorderBeam
size="md"
colorVariant="mono"
staticColors
duration={4.2}
strength={0.42}
active={selected && !reduceMotion}
className="beam-card"
>
<button
type="button"
className="beam-surface"
aria-pressed={selected}
onClick={onSelect}
>
{label}
</button>
</BorderBeam>
- Use
aria-selectedfor tabs, listbox options, grid cells, and similar selection widgets. - Use
aria-currentfor
よくある質問
別のスタイルシートを読み込む必要がありますか?
いいえ。パッケージが自分でスタイルを入れるので、コンポーネントの読み込みだけで十分です。
Reactの外でも使えますか?
このスキルはReactとNext.jsのプロジェクト向けに書かれています。
動きを減らしたい訪問者にはどうしますか?
動きを減らす設定とアクセシビリティの指針が含まれており、アニメーションがなくても状態が分かるようにします。
詳細
作者による元の説明
Create React loading, processing, selected, current, focus, and pressed states with the border-beam package's animated edge glow. Use when a card, button, input, tab, option, task panel, or agent surface needs a restrained traveling or breathing beam; includes installation, imports, prop selection, state wiring, reduced motion, accessibility, and performance and layout guardrails.
repo: MengTo/Skills
人気
- GitHubのスター
- 7.2k
- ランキング
- #13400
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
3d-cloth-material
7.2kThree.js で、糸の織り、柔らかい光沢、自然な襞、裾、縫い目を持つ、本物の織物らしい布を作るようエージェントを支援します。
3d-falling-leaves
7.2k3D のシーンに、回転し、風に流され、カメラの動きに合わせて再利用される、本物らしい落ち葉を加えるようエージェントを支援します。
3d-four-seasons
7.2k3D のシーンに、春、夏、秋、冬の見た目を加え、シーン全体を作り直さずに、茂み、光、空、雪を変えるようエージェントを支援します。
3d-high-poly-models
7.2k滑らかな形と自然な縁をもつ、詳細な3Dモデルを作り、その後、Web で快適に動く軽いバージョンを準備するようエージェントを支援します。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。