npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stianlarsen/border-beam

v1.0.13

Published

An animated border component that creates a visually stunning beam of light traveling along the borders of any container. Perfect for adding a modern, dynamic touch to your web components.

Readme

@stianlarsen/border-beam

npm version npm downloads bundle size license

An animated border component that creates a visually stunning beam of light traveling along the borders of any container.

Border Beam Preview

Installation

npm install @stianlarsen/border-beam

Usage

Import the component and its styles in your React project:

import { BorderBeam } from "@stianlarsen/border-beam";
import "@stianlarsen/border-beam/css";

function Card() {
  return (
    <div style={{ position: "relative", padding: "2rem", borderRadius: "8px" }}>
      <h2>Your content here</h2>
      <BorderBeam />
    </div>
  );
}

Important: You must import the CSS file separately as shown above. The parent container must have position: relative and a border-radius for the beam to follow the container shape.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | size | number | 200 | Size of the animated beam in pixels | | duration | number | 15 | Animation duration in seconds | | borderWidth | number | 1.5 | Border width in pixels | | anchor | number | 90 | Anchor point of the beam (percentage) | | colorFrom | string | "#ffaa40" | Gradient start color | | colorTo | string | "#9c40ff" | Gradient end color | | delay | number | 0 | Animation delay in seconds | | className | string | — | Additional CSS class |

Examples

Custom Colors

<BorderBeam colorFrom="#00ff88" colorTo="#0088ff" />

Faster Animation

<BorderBeam duration={5} size={150} />

Multiple Beams

<div style={{ position: "relative" }}>
  <BorderBeam colorFrom="#ff0000" colorTo="#ff8800" delay={0} />
  <BorderBeam colorFrom="#00ff00" colorTo="#00ffff" delay={5} />
</div>

Framework Compatibility

  • Next.js (App Router & Pages Router)
  • Vite
  • Create React App
  • Remix

This component includes the "use client" directive for React Server Components compatibility.

Requirements

  • React 18.0.0 or higher (including React 19)

License

MIT

Author

Stian Larsen · GitHub · [email protected]