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

@xuanhe/apple-intelligence-glow-react

v1.1.0

Published

Apple Intelligence style animated glow border as a reusable React component.

Readme

apple-intelligence-glow-react

Apple Intelligence–inspired animated glow border as a reusable React component.

npm version license

Live Demo

Glow Demo

Features

  • Multiple glow states: idle, hover, focus, thinking, success, error
  • Smooth state transitions with CSS animations
  • SSR compatible (Next.js, Remix, etc.)
  • Respects prefers-reduced-motion
  • TypeScript support
  • Zero dependencies (only React peer dependency)

Components

  • AppleIntelligenceGlow – Core reusable glow container with state support
  • AppleIntelligenceLockScreen – Demo lock screen UI with dynamic island and live clock

Installation

npm install apple-intelligence-glow-react

or with yarn / pnpm:

yarn add apple-intelligence-glow-react
# or
pnpm add apple-intelligence-glow-react

Quick Start

import { AppleIntelligenceGlow } from "apple-intelligence-glow-react";

function App() {
  return (
    <AppleIntelligenceGlow
      state="thinking"
      radius={24}
      style={{
        width: 300,
        height: 200,
        background: "#1a1a2e",
        padding: 20,
      }}
    >
      <div style={{ color: "#fff" }}>
        AI is thinking...
      </div>
    </AppleIntelligenceGlow>
  );
}

State Control

The component supports 6 different visual states:

import { useState } from "react";
import { AppleIntelligenceGlow, GlowState } from "apple-intelligence-glow-react";

function AIInput() {
  const [state, setState] = useState<GlowState>("idle");

  return (
    <AppleIntelligenceGlow
      state={state}
      radius={16}
      onMouseEnter={() => setState("hover")}
      onMouseLeave={() => setState("idle")}
      onFocus={() => setState("focus")}
    >
      <textarea placeholder="Ask AI..." />
    </AppleIntelligenceGlow>
  );
}

| State | Description | Visual Effect | |-------|-------------|---------------| | idle | Default state | Very subtle glow (15% intensity) | | hover | Mouse hover | Light highlight (35% intensity) | | focus | Input focused | Clear focus ring (55% intensity) | | thinking | AI processing | Animated gradient (75% intensity, faster rotation) | | success | Task complete | Bloom effect (100% intensity) | | error | Error state | Solid red glow (no rotation) |


API Reference

AppleIntelligenceGlow

| Prop | Type | Default | Description | |------|------|---------|-------------| | state | GlowState | "thinking" | Visual state of the glow | | isActive | boolean | true | Enable/disable glow effect | | isPaused | boolean | false | Pause animation (keeps current state) | | radius | number \| string | 50 | Border radius | | className | string | - | Custom CSS class | | style | CSSProperties | - | Inline styles | | children | ReactNode | - | Content to wrap |

AppleIntelligenceLockScreen

| Prop | Type | Default | Description | |------|------|---------|-------------| | width | number \| string | 360 | Phone frame width | | height | number \| string | 720 | Phone frame height | | isActive | boolean | true | Enable/disable glow | | isPaused | boolean | false | Pause animation | | className | string | - | Custom CSS class | | style | CSSProperties | - | Inline styles |

GlowState Type

type GlowState = "idle" | "hover" | "focus" | "thinking" | "success" | "error";

Custom Colors

Override the default gradient colors using CSS variables:

<AppleIntelligenceGlow
  style={{
    "--aie-color-1": "#00FF00",
    "--aie-color-2": "#00CC00",
    "--aie-color-3": "#009900",
    "--aie-color-4": "#006600",
    "--aie-color-5": "#003300",
    "--aie-color-6": "#00FF00",
  }}
>
  {/* Green theme */}
</AppleIntelligenceGlow>

Examples

AI Chat Input

function AIChatInput() {
  const [state, setState] = useState("idle");
  const [isLoading, setIsLoading] = useState(false);

  const handleSubmit = async () => {
    setState("thinking");
    setIsLoading(true);

    try {
      await sendMessage();
      setState("success");
    } catch {
      setState("error");
    } finally {
      setIsLoading(false);
      setTimeout(() => setState("idle"), 2000);
    }
  };

  return (
    <AppleIntelligenceGlow state={state} radius={12}>
      <input
        onFocus={() => !isLoading && setState("focus")}
        onBlur={() => !isLoading && setState("idle")}
      />
      <button onClick={handleSubmit}>Send</button>
    </AppleIntelligenceGlow>
  );
}

Card with Hover Effect

<AppleIntelligenceGlow
  state={isHovered ? "hover" : "idle"}
  radius={20}
  className="card"
>
  <h2>Premium Feature</h2>
  <p>Unlock AI capabilities</p>
</AppleIntelligenceGlow>

License

MIT