EMBER // NEXTUI
Button
Warm-toned button with primary, secondary, and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Button variant="primary" size="md">Get started</Button>Variants
<Button variant="primary">Get started</Button>
<Button variant="secondary">Learn more</Button>
<Button variant="ghost">Cancel</Button>
<Button variant="primary" size="sm">Apply</Button>
<Button variant="primary" size="lg">Sign up</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: 'emb-btn emb-btn-primary',
secondary: 'emb-btn emb-btn-secondary',
ghost: 'emb-btn emb-btn-ghost',
}
const sizeClass: Record<NonNullable<ButtonProps['size']>, string> = {
sm: 'emb-btn-sm',
md: '',
lg: 'emb-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>
)
}
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from EMBER // NEXT
Badge
Ember-styled badge with five color variants: orange, amber, green, red, and muted. Suited for category labels, status tags, and inline highlights.
Text
Polymorphic text primitive with body, caption, label, and code variants. Renders as p, span, or div via the `as` prop.
Card
Composable card with Card, CardHeader, CardBody, and CardFooter sub-components. Uses `emb-ui-card` CSS classes for the Ember warm palette.