MERIDIAN // NEXTUI

Button

Dashboard button with primary (solid), secondary (outline), and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.

$npx @voltenworks/shipui add button --theme meridian
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/meridian/demo/components#01-button
Usage
TSX
<Button variant="primary" size="md">Save changes</Button>
Variants
<Button variant="primary">Save changes</Button>
<Button variant="secondary">Cancel</Button>
<Button variant="ghost">Learn more</Button>
<Button variant="primary" size="sm">Apply</Button>
<Button variant="primary" size="lg">Submit</Button>
Source
TSX
import type * as React from 'react'
import Link from 'next/link'
import { cn } from '@/lib/utils'

interface ButtonProps {
  children: React.ReactNode
  variant?: 'primary' | 'secondary' | 'ghost'
  size?: 'sm' | 'md' | 'lg'
  href?: string
  onClick?: () => void
  type?: 'button' | 'submit' | 'reset'
  disabled?: boolean
  className?: string
}

const variantClass: Record<NonNullable<ButtonProps['variant']>, string> = {
  primary: 'mdn-btn mdn-btn-solid',
  secondary: 'mdn-btn',
  ghost: 'mdn-btn mdn-btn-ghost',
}

const sizeClass: Record<NonNullable<ButtonProps['size']>, string> = {
  sm: 'mdn-btn-sm',
  md: '',
  lg: 'mdn-btn-lg',
}

export function Button({
  children,
  variant = 'primary',
  size = 'md',
  href,
  onClick,
  type = 'button',
  disabled,
  className,
}: ButtonProps): React.JSX.Element {
  const classes = cn(variantClass[variant], sizeClass[size], className)

  if (href) {
    return (
      <Link href={href} className={classes}>
        {children}
      </Link>
    )
  }

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

Badge

Status badge with six color variants: ice, green, amber, red, violet, and surface. Designed for dashboard labels, status indicators, and category tags.

MERIDIAN // NEXTUI

Text

Polymorphic text primitive with body, caption, label, code, and mono variants. Renders as any block or inline HTML tag via the `as` prop.

MERIDIAN // NEXTUI

Card

Composable card with Card, CardHeader, and CardBody sub-components. Uses `mdn-card` CSS classes for consistent dashboard panel styling.

MERIDIAN // NEXTUI

StatusPill

Compact status indicator with five semantic states: ok, warn, err, idle, and info. Each state maps to a default label (Healthy, Degraded, Down, Idle, Info) that can be overridden via the label prop.