VAULT // NEXTUI

Button

Dark docs-style button with primary, secondary, and ghost variants in three sizes. Renders as a Next.js Link for internal hrefs and a plain anchor for external links.

$npx @voltenworks/shipui add button --theme vault
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/vault/demo/components
Usage
TSX
<Button variant="primary" size="md">Get started</Button>
Variants
<Button variant="primary">Get started</Button>
<Button variant="secondary">View source</Button>
<Button variant="ghost">Learn more</Button>
<Button variant="primary" size="sm">Install</Button>
<Button variant="primary" size="lg">Read the docs</Button>
Source
TSX
import type * as React from 'react'
import Link from 'next/link'
import { cn } from '@/lib/utils'

type ButtonVariant = 'primary' | 'secondary' | 'ghost'
type ButtonSize    = 'sm' | 'md' | 'lg'

interface ButtonProps {
  variant?:  ButtonVariant
  size?:     ButtonSize
  href?:     string
  onClick?:  () => void
  type?:     'button' | 'submit' | 'reset'
  disabled?: boolean
  className?: string
  children:  React.ReactNode
  external?: boolean
}

export function Button({
  variant  = 'primary',
  size     = 'md',
  href,
  onClick,
  type     = 'button',
  disabled = false,
  className,
  children,
  external = false,
}: ButtonProps): React.JSX.Element {
  const cls = cn(
    'vault-btn',
    `vault-btn--${variant}`,
    `vault-btn--${size}`,
    className,
  )

  if (href) {
    if (disabled) {
      return (
        <a
          href={href}
          className={cn(cls, 'opacity-50 cursor-not-allowed pointer-events-none')}
          aria-disabled="true"
          tabIndex={-1}
          onClick={(e) => e.preventDefault()}
        >
          {children}
        </a>
      )
    }
    if (external) {
      return (
        <a href={href} className={cls} target="_blank" rel="noopener noreferrer">
          {children}
        </a>
      )
    }
    return (
      <Link href={href} className={cls}>
        {children}
      </Link>
    )
  }

  return (
    <button type={type} onClick={onClick} disabled={disabled} className={cls}>
      {children}
    </button>
  )
}
Preview in theme demoGet full theme, $29
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from VAULT // NEXT
VAULT // NEXTUI

Badge

Semantic status badge with six color variants: green, blue, yellow, red, purple, and muted. Suited for version tags, API status labels, and changelog markers.

VAULT // NEXTUI

Callout

Inline callout block with four semantic variants: info, warn, tip, and danger. Each renders a matching icon and left-accent color for inline documentation alerts.

VAULT // NEXTUI

Card

Feature card with icon, title, optional badge, and description. Accepts an accent prop for a highlighted border variant. Icon set: book, code, key, zap, layers, terminal, shield, cpu.

VAULT // NEXTUI

CodeBlock

Syntax-highlighted code block with a header showing the language or file title and a one-click copy button. Client component with clipboard feedback.