Skip to content
synccn

Shine Border

Rotating gradient that glints around a card's edge.

Pro features unlocked

Every block, every theme and early access to new components.

Installation

$ pnpm dlx shadcn@latest add @synccn/shine-border

First time in this project? Connect synccn with one command.

Usage

import { ShineBorder } from "@/components/ui/shine-border";<ShineBorder>…</ShineBorder>

API reference

Generated from the component's TypeScript types, so it always matches the code.

ShineBorder

A rotating gradient that glints around the border of its container.

  • colors
    string[]

    Default ["oklch(0.75 0.15 230)", "oklch(0.7 0.2 300)", "oklch(0.8 0.14 60)"]

    Colours of the moving glint.

  • width
    number

    Default 1.5

    Border width in pixels.

  • duration
    number

    Default 8

    Seconds per rotation.

  • innerClassName
    string

    Classes for the inner surface.

  • children
    React.ReactNode

    Content to render.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • Shows a visible focus ring for keyboard users