beam-glow-states
Create React loading, processing, selected, current, focus, and pressed states with the border-beam package's animated edge glow
Install / Use
npx skills add MengTo/Skills --skill beam-glow-statesInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of beam-glow-states
beam-glow-states scores 96/100 on our quality scale, 229th of 4,698 Development & Engineering skills we index (top 5%).
Its SKILL.md is 12 KB long, well organised into 12 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.
With 6,252 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so beam-glow-states is actively maintained.
- Our last check on 2026-11-15 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-02. Automated pattern scan on 2026-10-02. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
beam-glow-states compared with similar skills
All 4 of these similar skills score higher than beam-glow-states; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| beam-glow-states (this skill)by MengTo | 96 | 6.3k | 54d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install beam-glow-states?
- Run
npx skills add MengTo/Skills --skill beam-glow-states. The install tabs above show the steps for each supported agent. - Which AI agents does beam-glow-states work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is beam-glow-states safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is beam-glow-states still maintained?
- The repository was last updated about 2 months ago, so beam-glow-states is actively maintained.
Skill content
View source on GitHubname: beam-glow-states description: 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.
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 the current page, step, date, or location. - Use
aria-pressedonly for toggle buttons. - Keep a static selected background or outline. The beam should add attention, not carry meaning by itself.
- Slow persistent selected beams down. Reserve the faster default travel for loading or brief activation.
For a large collection, animate only the newly selected item for 800ms to 1200ms, then retain the static selected style. Do not run a beam on every selected item indefinitely.
Wire focus and active state
Track focus on the wrapper because all standard HTMLDivElement attributes and capture handlers are forwarded:
const [focused, setFocused] = useState(false);
<BorderBeam
size="sm"
colorVariant="mono"
strength={0.45}
active={focused && !reduceMotion}
className="beam-inline"
onFocusCapture={() => setFocused(true)}
onBlurCapture={(event) => {
const next = event.relatedTarget as Node | null;
if (!next || !event.currentTarget.contains(next)) setFocused(false);
}}
>
<button className="beam-surface">Run</button>
</BorderBeam>
Keep the ordinary :focus-visible outline. Pointer hover alone should not start a high-intensity beam, and a pressed state should still have immediate scale, fill, or contrast feedback.
When states overlap, resolve them explicitly:
const beamState =
pending ? "loading" :
selected ? "selected" :
focused ? "focus" :
"idle";
const beamProps = {
loading: {
size: "pulse-inner",
colorVariant: "ocean",
duration: 2.6,
strength: 0.65,
},
selected: {
size: "md",
colorVariant: "mono",
duration: 4.2,
strength: 0.42,
staticColors: true,
},
focus: {
size: "sm",
colorVariant: "mono",
duration: 2.4,
strength: 0.45,
staticColors: true,
},
} as const;
const activeProps = beamState === "idle" ? null : beamProps[beamState];
<BorderBeam
{...(activeProps ?? { size: "md" as const })}
active={activeProps !== null && !reduceMotion}
>
<div className="beam-surface" data-state={beamState}>
{children}
</div>
</BorderBeam>
Use loading above selection, selection above focus, and focus above hover unless the product's state model says otherwise.
Handle reduced motion
Pulse presets stop their animations under prefers-reduced-motion: reduce. Rotate and line presets should also be disabled by the consumer. Use the project's media-query hook or a small client hook:
function useReducedMotion() {
const [reduced, setReduced] = useState(false);
useEffect(() => {
const media = window.matchMedia("(prefers-reduced-motion: reduce)");
const update = () => setReduced(media.matches);
update();
media.addEventListener("change", update);
return () => media.removeEventListener("change", update);
}, []);
return reduced;
}
Provide a static fallback on the child surface:
.beam-surface {
border: 1px solid rgb(255 255 255 / 0.12);
}
[data-state="selected"] {
border-color: rgb(140 155 255 / 0.7);
box-shadow: 0 0 0 3px rgb(100 120 255 / 0.12);
}
:focus-visible {
outline: 2px solid currentColor;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
[data-state="loading"] {
border-color: rgb(100 150 255 / 0.68);
}
}
API reference
| Prop | Type | Default | Contract |
| --- | --- | --- | --- |
| children | ReactNode | Required | Content wrapped by one generated div |
| size | "sm" \| "md" \| "line" \| "pulse-outside" \| "pulse-inner" | "md" | Effect family and geometry preset |
| colorVariant | "colorful" \| "mono" \| "ocean" \| "sunset" | "colorful" | Beam palette |
| theme | "dark" \| "light" \| "auto" | "dark" | Adapts opacity and color treatment to the background |
| strength | number | 1 | Beam-layer opacity; clamped to 0–1; never changes child opacity |
| duration | number | 1.96 rotate, 3.1 line, 2.3 pulse | Animation cycle in seconds |
| active | boolean | true | Starts fade-in or fade-out and controls ongoing motion |
| borderRadius | number | Auto-detected | Wrapper radius in pixels |
| brightness | number | Per preset, usually 1.3 | Glow brightness multiplier |
| saturation | number | Per theme, usually 1.2 on dark | Glow saturation multiplier |
| hueRange | number | 30 | Hue-shift range in degrees; line is capped at 13 |
| staticColors | boolean | false | Disables hue shifting, not travel or pulse motion |
| className | string | — | Class on the generated wrapper |
| style | CSSProperties | — | Inline style on the generated wrapper |
| onActivate | () => void | — | Fires when the 0.6s fade-in completes |
| onDeactivate | () => void | — | Fires when the 0.5s fade-out completes |
mono always uses static colors, even when staticColors is false. A forwarded ref points to the wrapper. Other standard HTMLDivElement attributes and events are forwarded.
The package also exports sizePresets, sizeThemePresets, and the deprecated themeColors. Treat them as implementation reference; prefer component props instead of mutating exported preset objects.
Respect the wrapper
BorderBeamrenders adiv. Place it inside required semantic parents such asli,td, orlabel; do not let it replace those elements.- The wrapper is block-level by default. Use
display: inline-blockorinline-flexfor compact controls andwidth: 100%for cards. - Keep the first child aligned to the wrapper bounds. A small child inside a stretched wrapper produces a beam around empty space.
- Border radius is read from the first child's computed top-left radius. Set
borderRadiusexplicitly when corners differ, radius changes at runtime, or late styles make detection unreliable. sm,md,line, andpulse-innerclip overflow. Do not place menus or tooltips inside those wrappers if they must escape.pulse-outsideusesoverflow: visible. Its child must be opaque so the inner glow does not show through, and the surrounding layout must allow the halo to spill.- Give
pulse-outsidechildren their own subtle1pxborder or inset ring. That preset intentionally does not paint a separate idle hairline.
.beam-inline {
display: inline-block;
}
.beam-card {
display: block;
width: 100%;
}
.beam-surface {
width: 100%;
border-radius: inherit;
background: rgb(18 18 20);
}
Keep it restrained
- Use one dominant animated beam per viewport. Several simultaneous beams flatten hierarchy and increase paint work.
- Prefer
strengthbefore changing brightness or saturation. - Keep selection beams slower and quieter than loading beams.
- Do not combine a full beam with another animated gradient border, large pulsing shadow, and moving background.
- Let
pulse-outsidebreathe into real empty space; never crop it accidentally. - Expect pulse instances to share a frame-rate-capped animation loop and pause offscreen. Rotate and line use CSS animation and also pause when the component is offscreen.
Verify
Te
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
