Zum Inhalt springen
Skillpedia
Websites & UI (Frontend)7.2k · #13400

beam-glow-states

Was er macht

Dieser Skill leitet einen Agenten an, ein Border-Beam-Paket zu nutzen, um Teilen einer React-App ein leichtes wanderndes oder atmendes Leuchten zu geben. Er richtet sich an Entwickler, die klare Zustandssignale ohne schwere Effekte wollen.

Wann du ihn nutzt

  • ✓Wenn ein Button oder eine Karte zeigen soll, dass sie lädt, ausgewählt ist oder verarbeitet wird.
  • ✓Wenn ein Eingabefeld, ein Tab oder eine Option einen klaren Fokus- oder Zustandsglanz braucht.
  • ✓Wenn das Aufgabenpanel eines KI-Agenten eine zurückhaltende animierte Hervorhebung braucht.

Link zum Skill

https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/beam-glow-states/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/beam-glow-states/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Füge um die Karte, die gerade verarbeitet wird, einen sanften animierten Glanz in meinem React-Dashboard hinzu.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent installiert das Paket und umschließt das Element mit der Beam-Komponente, wobei er Größe und Zustand wählt. Der Zustand muss weiterhin durch Text und Form klar sein, weil die Animation abgeschaltet werden kann.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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} to 0.75, duration={2.3} to 3.
  • Selected or current: md or pulse-inner, strength={0.3} to 0.55, duration={3.2} to 5.
  • Focus or short active feedback: sm or line, strength={0.35} to 0.6.
  • High-priority live task: pulse-outside, strength={0.45} to 0.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 150ms or less.
  • Once shown, keep the loading presentation visible for about 400ms to 600ms to 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-selected for tabs, listbox options, grid cells, and similar selection widgets.
  • Use aria-current for
Häufige Fragen

Brauche ich ein separates Stylesheet?

Nein. Das Paket bringt seine eigenen Styles mit, daher reicht der Komponentenimport.

Funktioniert es außerhalb von React?

Der Skill ist für React- und Next.js-Projekte geschrieben.

Was ist, wenn ein Besucher weniger Bewegung möchte?

Der Skill enthält Hinweise zu reduzierter Bewegung und Barrierefreiheit, damit der Zustand auch ohne Animation verständlich bleibt.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
7.2k
Platz im Ranking
#13400
Lizenz
MIT
Aktualisiert
1.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills