SYS:ONLINE● ACTIVE
THEME
GITHUBv0.1.0

BUTTON

Interactive trigger element with four semantic variants. Supports asChild for polymorphic rendering via Radix Slot.

DEPS:@radix-ui/react-slotclass-variance-authority

PREVIEW

INSTALLATION

BASH
npx shadcn@latest add @scificn/button

USAGE

TSX
import { Button } from '@/ui/button'

export function Example() {
  return (
    <Button variant="EXEC" size="MD">
      INITIATE SEQUENCE
    </Button>
  )
}

VARIANTS

variant="EXEC"
variant="OUTLINE"
variant="GHOST"
variant="ABORT"

SIZES

AS CHILD

Use asChild to render button styles on any element (e.g. a link).

TSX
import { Button } from '@/ui/button'
import { Link } from 'react-router-dom'

// Renders as <a> with Button styles
<Button asChild variant="EXEC">
  <Link to="/docs/introduction">READ DOCS</Link>
</Button>

PROPS

PROPTYPEDEFAULTDESCRIPTION
variantEXEC | OUTLINE | GHOST | ABORTOUTLINEVisual style and semantic meaning of the button.
sizeSM | MD | LGMDControls height and horizontal padding.
asChildbooleanfalseMerge button props onto the child element instead of rendering a <button>.
disabledbooleanfalseDisables the button and reduces opacity.
classNamestringAdditional Tailwind classes merged via cn().