NeonKit
esc
  • IntroductionGetting started
  • InstallationGetting started
  • ThemingGetting started
  • Use with AIGetting started
  • All componentsGetting started
  • ButtonSolid, outline, soft, ghost and link buttons that light up on hover.Forms
  • InputText field with an animated neon focus ring, icons, labels and error states.Forms
  • TextareaMulti-line field that grows with its content and counts characters.Forms
  • SelectKeyboard-friendly listbox with a glowing popover and typeahead.Forms
  • CheckboxCheckbox with a drawn-on checkmark and indeterminate state.Forms
  • Radio GroupSingle choice from a set, with arrow-key navigation and card layouts.Forms
  • SwitchA toggle that powers on like a neon tube.Forms
  • SliderPointer and keyboard slider with a glowing track and optional range.Forms
  • OTP InputOne-time code input with auto-advance, paste and backspace handling.Forms
  • BadgeStatus labels with optional live dot and remove button.Data Display
  • AvatarProfile image with initials fallback, status light and stacked groups.Data Display
  • CardSurface with header, content and footer slots and a lit edge.Data Display
  • KbdKeyboard keys and shortcuts that glow when pressed.Data Display
  • TabsTabbed panels with a sliding light indicator and roving focus.Data Display
  • AccordionCollapsible sections with smooth height animation.Data Display
  • ProgressLinear and circular progress with a moving highlight.Feedback
  • SpinnerRing, dots and bars loaders in any neon color.Feedback
  • SkeletonLoading placeholders with a scanning shimmer.Feedback
  • AlertInline messages for info, success, warning and errors.Feedback
  • ToastStacked notifications with a tiny toast() API. No provider needed.Feedback
  • DialogAccessible modal built on the native dialog element.Overlay
  • TooltipHover and focus hints on four sides.Overlay
  • Neon TextText rendered as a glowing tube sign, with optional power-on flicker.Effects
  • Border BeamA beam of light that travels around any element's border.Effects
  • Spotlight CardCard whose border and surface light up under the cursor.Effects
  • Retro GridSynthwave perspective grid that scrolls toward the horizon.Effects

Components/Overlay

Dialog

Accessible modal built on the native dialog element.

Installation#

npx shadcn@latest add https://get-neonkit.vercel.app/r/dialog.json

Usage#

import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@/components/ui/dialog"

<Dialog>
  <DialogTrigger asChild>
    <Button>Edit profile</Button>
  </DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Edit profile</DialogTitle>
      <DialogDescription>This is how teammates see you.</DialogDescription>
    </DialogHeader>
    <DialogFooter>
      <DialogClose asChild>
        <Button variant="ghost">Cancel</Button>
      </DialogClose>
    </DialogFooter>
  </DialogContent>
</Dialog>

Examples#

Destructive

color tints the panel, its glow and every button inside. Typing the name unlocks the action.

Sizes

API reference#

Dialog

Holds the open state. Renders no element of its own.

PropTypeDefault
openboolean

Controlled open state.

—
defaultOpenboolean

Initial state when uncontrolled.

false
onOpenChange(open: boolean) => void

Called when the trigger, a close button, Escape or the overlay asks to change state.

—
colorNeonColor

Palette name or hex. Falls back to --neon-accent, then cyan.

inherited

DialogTrigger

Renders a button that opens the dialog. Also accepts every native button attribute.

PropTypeDefault
asChildboolean

Merges trigger behaviour onto its single child element instead of rendering a button.

false

DialogContent

The overlay and panel, rendered in a native <dialog> on the top layer. Other props go to the panel.

PropTypeDefault
size"sm" | "md" | "lg"

Maximum panel width: 384, 512 or 672px.

"md"
showCloseboolean

Shows the X button in the top-right corner.

true

DialogClose

Renders a button that closes the dialog. Also accepts every native button attribute.

PropTypeDefault
asChildboolean

Merges close behaviour onto its single child element instead of rendering a button.

false

DialogHeader, DialogTitle, DialogDescription, DialogFooter

Layout and text parts. Each accepts the native attributes of its element.

PropTypeDefault
DialogTitleh2

Labels the dialog through aria-labelledby.

—
DialogDescriptionp

Describes the dialog through aria-describedby, only while it's rendered.

—
DialogFooterdiv

Stacks actions on small screens and right-aligns them from sm up.

—

Accessibility#

  • Opens with showModal(), so the browser traps focus, makes the page inert and moves focus to the first focusable element.
  • Escape and clicks on the overlay close the dialog after its exit animation.
  • Focus returns to the element that opened the dialog, and page scroll is locked while it's open.
  • Always include a DialogTitle, even a visually hidden one, so the dialog has an accessible name.