reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
Button
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

Button

Component

Use accessible buttons with primary, secondary, ghost, and danger variants, three sizes, icons, loading, and aria-busy states.

input
Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { Button } from "@reopt-ai/opt-ui";

Live preview

Change the width and theme, then interact with the components.

100%

Variants

Sizes

States

Loading & Disabled

With Icons

Save, failure, and retry

Fail the next save

Save a draft, then try a failed request and retry.

Usage guidance

Best practices

  • Use primary for the main action and danger for destructive actions. Keep text that describes the action.
  • Set type=submit explicitly for form submission. loading disables the button and sets aria-busy.

Usage to avoid

  • Use links for page navigation. Give icon-only buttons an accessible name.

Usage examples

Button variants

Button

PropTypeDefaultDescription
variant"primary" | "secondary" | "ghost" | "danger""primary"버튼 스타일 변형
size"sm" | "md" | "lg""md"버튼 크기
loadingbooleanfalse로딩 상태. true면 스피너 표시 및 비활성화
leftIconReactNode—버튼 텍스트 왼쪽에 표시할 아이콘
rightIconReactNode—버튼 텍스트 오른쪽에 표시할 아이콘
disabledboolean—비활성화 상태

컴포넌트 의존 관계

깊이
▲ USED BY (29)data-tablefilter-barfloating-action-baralert-buildersql-editorreport-buildersegment-buildercriteria-builderinsights-paneltime-range-selectorexport-buttoncomparison-selectorwebhook-configdata-import-wizardsaved-filtersaudit-timelinechat-sidebarchat-inputquery-toolbarquery-history-listquery-workspacealert-managerproject-settingssegment-managerpath-analysiscohort-comparisoncustom-dashboardproject-overviewitem-detailButton
View test results

테스트 커버리지

2026년 7월 9일5/5 통과
5성공
0실패
5전체
  • button role을 렌더링한다
  • variant에 따른 스타일을 적용한다
  • loading 상태에서 비활성화된다
  • disabled 상태를 지원한다
  • leftIcon을 렌더링한다

Blocks that use this component

opt-ui

AlertManager

Blocks

Manage alerts with a DataTable and AlertBuilder.

opt-ui

CohortComparison

Blocks

Compare up to five cohorts across four tabs with comparison charts, retention heatmaps, and tables.

opt-ui

CustomDashboard

Blocks

Arrange custom dashboard widgets with WidgetGrid, ReportBuilder, ReportWidget, and FilterBar.

opt-ui

ItemDetail

Blocks

Present an item or product with tags, author information, content, and reviews.

opt-ui

PathAnalysis

Blocks

Configure user-path analysis and explore grid or Sankey flows, top paths, drop-off, patterns, entry and exit points, and dwell time.

opt-ui

ProjectOverview

Blocks

Summarize a project with metrics, navigation cards, charts, tables, code snippets, and dashboard management.

opt-ui

ProjectSettings

Blocks

Manage project settings, retention policies, cleanup previews, and storage usage with forms, tables, and code snippets.

opt-ui

SegmentManager

Blocks

Manage segments with a DataTable and SegmentBuilder.

Related components

opt-ui

Select

Core

Build a dropdown selection with Root, Label, Trigger, Popover, and Item components.

opt-ui

Combobox

Core

Build autocomplete search with an input, popover, items, groups, group labels, and an empty state.

opt-ui

Input

Core

Use a standalone text input with labels, errors, hints, and icons.

opt-ui

Switch

Core

Toggle a setting with three sizes and explicit accessible associations for labels and descriptions.

opt-ui

Textarea

Core

Enter multiline text with the same label, error, and hint API as Input.

opt-ui

Checkbox

Core

Use labeled checkboxes with descriptions, groups, and an indeterminate state synchronized to the DOM property.

PreviousFormNextBadge