Skip to Content

Hover Edge

Hover edge accent: a thin rose and amber line on any edge of a positioned parent, as used on cascade Card examples. It appears on parent hover or keyboard focus, can mark a selected item, and honors reduced motion.

pnpm dlx shadcn add @01orbital/hover-edge

The example also uses button. Install it too:

pnpm dlx shadcn add @01orbital/button

Usage

import { HoverEdge } from "@/components/glow/hover-edge"
import { Button } from "@/components/ui/button"

export default function HoverEdgeDemo() {
  return (
    <div className="flex flex-wrap items-center justify-center gap-6">
      <Button
        variant="outline"
        size="lg"
        className="relative overflow-hidden rounded-md"
      >
        Hover or focus
        <HoverEdge />
      </Button>
      <Button
        variant="outline"
        size="lg"
        className="relative overflow-hidden rounded-md"
      >
        A selected item
        <HoverEdge edge="top" active />
      </Button>
    </div>
  )
}

Examples

New

hover-edge-buttons

hover-edge-buttons

Buttons

Example of the Hover Edge: two outline buttons on a dark panel, one lit along the bottom and one along the top on hover or keyboard focus.

pnpm dlx shadcn add @01orbital/hover-edge-buttons

New

hover-edge-tabs

hover-edge-tabs

Tabs

Example of the Hover Edge: a row of tabs where the line follows the pointer and stays lit under the selected tab, a quiet active indicator for navigation.

pnpm dlx shadcn add @01orbital/hover-edge-tabs

New

hover-edge-field

hover-edge-field

Field

Example of the Hover Edge: a text input whose underline lights on hover and while the field has keyboard focus, a focus treatment for forms.

pnpm dlx shadcn add @01orbital/hover-edge-field

API reference

A two-pixel rose–amber edge, fading out at both ends. Place as a direct child of a positioned element: it appears when that parent is hovered, has keyboard focus, or holds a link or button with keyboard focus. Focus in a form field inside the parent leaves it off. No hover group or event handlers are required. Reduced motion removes the opacity transition. The line is decorative, ignores the pointer and uses a span root so it can sit inside buttons and links as well as larger containers.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs them for you.

No other registry pieces.