Pular para o conteúdo
Skillpedia
Sites e telas (frontend)7,2 mil · #13400

beam-glow-states

O que ela faz

Esta skill orienta um agente de IA a usar um pacote de feixe de borda para colocar um brilho suave que percorre ou pulsa em partes de um app React. Ela serve para desenvolvedores que querem sinais claros de estado sem visuais pesados.

Quando usar

  • ✓Quando um botão ou card deve mostrar que está carregando, selecionado ou processando.
  • ✓Quando um campo, aba ou opção precisa de um brilho claro de foco ou de estado atual.
  • ✓Quando o painel de tarefas de um agente de IA precisa de um destaque animado e contido.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/beam-glow-states/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Acrescente um brilho animado e suave em volta do card que está processando no meu painel React.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente instala o pacote e envolve o elemento com o componente de feixe, escolhendo tamanho e estado. O estado precisa continuar claro pelo texto e pela forma, porque a animação pode ser desligada.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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
Perguntas frequentes

Preciso importar uma folha de estilos separada?

Não. O pacote injeta os próprios estilos, então basta importar o componente.

Funciona fora do React?

A skill é escrita para projetos React e Next.js.

E se o visitante preferir menos movimento?

A skill inclui orientações de movimento reduzido e de acessibilidade, para que o estado continue compreensível sem a animação.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
7,2 mil
Posição no ranking
#13400
Licença
MIT
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas