Shadcn Shine Border Components

An animated light border for cards, buttons, inputs and announcements, with sweep, beam, aurora and marching dash styles, optional outer glow, custom colors, speed, direction and pause control. Pure CSS, theme aware and paused for reduced motion. Browse our collection of 16 Shadcn Shine Border variants.

Basic

Upgrade to Pro
Unlock unlimited projects, priority support and advanced analytics.

Pricing plan

Team
Most popular
For growing teams shipping every week.

$49/ month

  • Unlimited projects
  • Up to 20 team members
  • Advanced analytics
  • Priority support

AI prompt with glow

Announcement pill

Shine button

Glow on focus

Live metric

Live revenue
$48,295
12.4%

Membership card

Premium member

4821 0937 5512 7740

Member

Olivia Martin

Since

2023

Processing state

quarterly-report.pdf

Extracting tables and charts...

Drop zone

Selected option

AI image generation

Generating image0%

Misty mountain range at sunrise, soft golden light, wide angle

AI summary skeleton

AI summary
Reading 12 customer interviews...

Story ring

Voice assistant

Listening...

Call controls

Unlock premium components
Get full control of shadcn/ui components, blocks and instances, including future additions.

Explore Shadcn Blocks

Ready-made page sections built with the same components.

View all blocks

Shadcn Shine Border Component

The Shadcn Shine Border draws an animated light along the edge of a card, button, input or banner. It pulls the eye to the one element that matters on a screen, such as the recommended pricing plan, an AI prompt box, a new feature announcement or a file that is still processing, without adding extra copy or color blocks.

This collection goes beyond a single glowing card. It shows the shine border on a pricing plan, an AI prompt with an outer glow, an announcement pill, a call to action button, an email field that lights up on focus, a live revenue metric, a membership card, a processing file row, a drop zone with marching dashes and a selected radio option. It also pairs with Skeleton for AI loading states, such as an image that is being generated or a summary that is being written, and wraps round elements like a story avatar, a voice assistant button and call controls. It is pure CSS, works with shadcn/ui, React and Tailwind CSS v4, and sits on top of any component, whether it is built with Radix UI or Base UI.

What is the Shadcn Shine Border Component?

A shine border is a decorative layer placed inside a relative container. It inherits the container's corner radius, paints an animated gradient and uses a CSS mask so that only a thin ring along the edge is visible. It ignores pointer events and is hidden from screen readers, so the content underneath keeps working exactly as before.

Four styles cover the common needs. Sweep moves a soft highlight around the edge. Beam sends a single beam of light around the border. Aurora rotates a multi color ring and can add an outer glow. Dashed marches dashes around the edge like a selection outline. Colors, thickness, speed and direction are props, and the animation stops for users who prefer reduced motion.

Anatomy of the Shadcn Shine Border

PartDescription
ShineBorderThe animated ring. Place it as the first child of a relative element. Props: variant, borderWidth, duration, color, glow, reverse and paused.
ContainerAny element with relative and a border radius, such as a Card, Button, Item or a plain div.

16 Shadcn Shine Border Variants

Each shine border variant listed here is previewed live at the top of this page, together with its source code and install command.

  • Basic: An Upgrade to Pro card with a soft sweep in the primary color.
  • Pricing plan: A Most popular plan card with a violet and sky beam, price, feature list and trial button.
  • AI prompt with glow: A prompt box with an aurora ring and an outer glow, attachment and model buttons and a send button.
  • Announcement pill: A rounded New badge link, the kind used above a hero heading, with a beam over its border.
  • Shine button: An outline Get started button with a fast sweep.
  • Glow on focus: An email field whose beam only appears while the input has focus.
  • Live metric: A revenue card with an emerald sweep, a pulsing live dot and a trend value.
  • Membership card: A premium card with a slow four color aurora ring, card number and member details.
  • Processing state: A file row with a beam, a progress bar and a spinner while a document is analyzed.
  • Drop zone: A file upload area outlined by marching dashes instead of a static dashed border.
  • Selected option: A plan picker built with Radio Group where only the selected option gets a beam.
  • AI image generation: A Skeleton image placeholder with an aurora ring and glow that counts up to 100% and then reveals the generated image.
  • AI summary skeleton: A card with skeleton lines and tags while an AI summary is written, with a violet and a sky beam circling in opposite directions.
  • Story ring: A round avatar with a rotating gradient ring that marks an unseen story.
  • Voice assistant: A round microphone button with a glowing aurora ring while the assistant is listening.
  • Call controls: Round call buttons where a fast emerald beam marks the active microphone.

How to Install the Shadcn Shine Border Component

Set up shadcn/ui in your project if you have not already, then add the Shadcn UI Kit registry to your components.json once:

{
  "registries": {
    "@shadcnuikit": "https://shadcnuikit.com/r/{name}.json"
  }
}

Then install a shine border variant by its name:

npx shadcn@latest add @shadcnuikit/shineborder1

The same command works with pnpm dlx, yarn dlx and bunx --bun. Each variant has a copy button for every package manager, and the code is added to your project as plain React and Tailwind CSS that you can edit freely.

How to Use the Shadcn Shine Border Component

Make the container relative, then render ShineBorder as its first child. When the container already has a 1px border, add className="-inset-px" so the light runs on top of that border.

import { Card, CardHeader, CardTitle } from "@/components/ui/card"
import { ShineBorder } from "@/components/ui/shine-border"

export function FeaturedPlan() {
  return (
    <Card className="relative">
      <ShineBorder
        variant="beam"
        borderWidth={2}
        duration={6}
        color={["var(--color-violet-500)", "var(--color-sky-400)"]}
      />
      <CardHeader>
        <CardTitle>Team</CardTitle>
      </CardHeader>
    </Card>
  )
}

Why Use the Shadcn Shine Border Component

  • Works on any component: It is a single overlay, so it wraps cards, buttons, inputs, list items and plain divs without changing their markup.
  • Pure CSS animation: The effect uses gradients, a CSS mask and keyframes, with no JavaScript loop and no animation library.
  • Four styles: Sweep, beam, aurora and dashed cover highlights, loading states, premium accents and selection outlines.
  • Theme aware: The default color is your primary token, and any CSS variable or color list can be passed for brand accents.
  • Respectful of motion settings: The animation stops when the user prefers reduced motion, and the paused prop lets you run it only on focus or hover.

Common Shine Border Use Cases

  • Pricing pages: Point users to the recommended plan.
  • AI features: Mark the prompt box or the AI generated answer as something special.
  • Announcements: Make a new release pill or banner stand out above a hero.
  • Processing states: Show that an upload, import or AI task is still running on its row.
  • Selection: Outline the selected option, a drop zone or the active card in a list.
  • Premium accents: Membership cards, badges and upgrade prompts.

Customizing the Shadcn Shine Border

color takes one value or a list. Theme tokens such as var(--primary) follow your palette and dark mode, and Tailwind palette variables such as var(--color-violet-500) work for colorful accents. borderWidth sets the thickness in pixels and duration the length of one loop in seconds.

Add glow for a soft light outside the edge. The container needs the isolate class and no overflow-hidden, so the glow is not hidden behind the page background. Use reverse to flip the direction and control visibility with classes, for example only on focus:

<div className="group relative rounded-md">
  <ShineBorder
    variant="beam"
    className="opacity-0 transition-opacity group-focus-within:opacity-100"
  />
  <Input placeholder="you@company.com" />
</div>

Shine Border Accessibility

The shine layer is decorative: it has aria-hidden and pointer-events-none, so it is never announced and never blocks clicks, focus or text selection. Meaning must come from the content itself, such as a Most popular badge or a status text, not from the animation alone.

The animation is disabled automatically when the operating system asks for reduced motion. Keep the duration slow for large surfaces, use one shine border per screen, and make sure focus rings stay visible when the shine sits on an interactive element.

Shine Border Best Practices

  • Highlight one element per view; several moving borders compete for attention.
  • Pair the shine with a text cue such as a badge, so the meaning does not rely on motion.
  • Use slow durations of 6 to 10 seconds on large cards and faster ones on small pills.
  • Keep the existing border and run the light on top of it with -inset-px for a crisp edge.
  • Prefer theme tokens for product UI and save colorful gradients for marketing pages.
  • For loading states with a known percentage, add a Progress bar next to the shine.

Shadcn Shine Border for AI Agents

Shine Border is the effect an agent reaches for when one element on a screen should stand out: the recommended pricing plan, an AI prompt box, a New release pill, a processing file row or the selected option in a plan picker. Claude Code can add it to any relative container, pick sweep, beam, aurora or dashed, and match the colors to your theme tokens.

Install it with an AI agent

Claude Code, Cursor, Codex and other agents can install these with the shadcn CLI, for example npx shadcn@latest add @shadcnuikit/shineborder1. With the Shadcn UI Kit MCP server, your agent can search every variant by name and add the right one for you. To give it full context, share /components/shine-border.md, the Markdown version of this page with every variant and install command.

Example prompts

  • “Add a beam ShineBorder to the Team plan card on our pricing page, with violet and sky colors and a Most popular badge.”
  • “Wrap our AI prompt input in an aurora ShineBorder with glow, and keep the rest of the chat page unchanged.”
  • “Show a dashed ShineBorder around the upload drop zone and a beam on file rows while they are processing.”

Customize it with AI

The container must be relative, and the agent should add -inset-px when the element already has a border so the light runs on top of it. Ask it to keep one shine border per view, use theme variables such as var(--primary) for product screens and pair the highlight with a visible text cue. Visibility on hover or focus is handled with group classes rather than JavaScript.

Components Related to Shine Border

Shadcn Shine Border FAQ

Add the relative class to the Card and render <ShineBorder /> as its first child. The border takes the card's radius automatically and animates in your primary color.

Pass color with a single value or a list, such as color={["var(--color-violet-500)", "var(--color-sky-400)"]}, and set duration in seconds. borderWidth changes the thickness.

It is a single absolutely positioned element animated with CSS keyframes, so there is no JavaScript running per frame. Use it on a few highlighted elements rather than on every card in a long list.

Yes. The default color is the primary theme token, which changes with dark mode, and any CSS variable you pass follows your theme as well.

Yes. Add a group class to the container and give ShineBorder opacity-0 with group-hover:opacity-100 or group-focus-within:opacity-100, or use the paused prop to stop the animation until you need it.

It is decorative, hidden from screen readers and ignores pointer events, and it stops animating when the user prefers reduced motion. Always add a text cue such as a badge for the meaning of the highlight.

Yes. Claude Code, Cursor, Copilot and other assistants can add a shine border variant with the shadcn CLI or the shadcn MCP server, for example npx shadcn@latest add @shadcnuikit/shineborder1. With a Pro plan, the Shadcn UI Kit MCP server can also build complete sections and pages around it.

Open /components/shine-border.md to get this page as Markdown, with every shine border variant, its description and install command. Paste the link or the text into your AI tool so it uses the real component code instead of guessing.

Looking for something else? Browse all shadcn/ui components or ready-made UI blocks built with them.

Shadcn Shine Border component preview