Button

다양한 스타일과 크기의 버튼 컴포넌트입니다.

설치

Terminal
npx @msub-core/ui-cli add button

사용법

TSX
import { Button } from "@msub-core/ui/components/button"

function MyComponent() {
  return (
    <Button onClick={() => console.log("clicked")}>
      클릭하세요
    </Button>
  )
}

Props

PropTypeDefaultRequiredDescription
variant"default" | "secondary" | "outline" | "ghost" | "link" | "destructive" | "success" | "warning""default"No버튼 스타일 변형
size"default" | "sm" | "lg" | "xl" | "icon""default"No버튼 크기
radius"none" | "sm" | "default" | "lg" | "full""sm"No버튼 모서리 둥글기
fullWidthbooleanfalseNo전체 너비 차지 여부
loadingbooleanfalseNo로딩 상태 (스피너 표시)
disabledbooleanfalseNo비활성화 상태
leftIconReactNode-No왼쪽 아이콘
rightIconReactNode-No오른쪽 아이콘
asChildbooleanfalseNo자식 요소로 렌더링 (Radix Slot 사용)

Variants

Sizes

Radius

아이콘과 함께

상태

전체 너비

실제 사용 예시