मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)7.2k · #13400

beam-glow-states

यह क्या करती है

यह स्किल एजेंट को React ऐप के कुछ हिस्सों पर border-beam पैकेज से हल्की चलती या साँस लेती चमक जोड़ना सिखाती है। यह उन डेवलपर्स के लिए है जिन्हें भारी विज़ुअल के बिना साफ़ स्थिति संकेत चाहिए।

कब इस्तेमाल करें

  • ✓जब कोई बटन या कार्ड दिखाना हो कि वह लोड हो रहा है, चुना गया है या प्रोसेस हो रहा है।
  • ✓जब किसी इनपुट, टैब या विकल्प को फ़ोकस या मौजूदा स्थिति की साफ़ चमक चाहिए।
  • ✓जब AI एजेंट के टास्क पैनल पर संयमित, एनिमेटेड हाइलाइट चाहिए।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/beam-glow-states/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे React डैशबोर्ड में जो कार्ड अभी प्रोसेस हो रहा है, उसके चारों ओर हल्की एनिमेटेड चमक जोड़िए।”

हर हफ़्ते 5 नई skills, 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} 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
अक्सर पूछे जाने वाले सवाल

क्या मुझे अलग स्टाइलशीट इम्पोर्ट करनी होगी?

नहीं। पैकेज अपनी स्टाइल खुद जोड़ता है, इसलिए सिर्फ़ कंपोनेंट इम्पोर्ट करना काफ़ी है।

क्या यह 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
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

3d-cloth-material

7.2k

आपके एजेंट को Three.js में असली बुने हुए कपड़े जैसा दिखने वाला मटीरियल बनाने में मदद करती है, जिसमें धागों की बुनाई, हल्की चमक, प्राकृतिक सिलवटें, किनारे और सीवन हों।

कोडिंगवेबसाइट और UI (frontend)

3d-falling-leaves

7.2k

आपके एजेंट को 3D दृश्य में असली लगने वाली गिरती पत्तियाँ जोड़ने देती है, जो लुढ़कती हैं, हवा के साथ बहती हैं और कैमरा हिलने पर दोबारा इस्तेमाल होती हैं।

कोडिंगवेबसाइट और UI (frontend)

3d-four-seasons

7.2k

आपके एजेंट को 3D दृश्य में वसंत, गर्मी, शरद और सर्दी के रूप जोड़ने देती है, जिसमें हरियाली, रोशनी, आसमान और बर्फ़ बिना दृश्य दोबारा बनाए बदलते हैं।

कोडिंगवेबसाइट और UI (frontend)

3d-high-poly-models

7.2k

आपके एजेंट को चिकने आकार और विश्वसनीय किनारों वाले विस्तृत 3D मॉडल बनाने देती है, और फिर वेब पर अच्छे चलने वाले हल्के संस्करण तैयार करती है।

कोडिंगवेबसाइट और UI (frontend)

मिलती-जुलती skills