Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Examples
  • Icon action
  • Loading
  • Disabled
  • Release review
  • Action hierarchy
  • Destructive actions
  • Action states
  • Control sizes
  • Icon actions
  • Recommendations
  • Usage boundaries
  • API reference

Actions

Button

Triggers an action with clear hierarchy and tactile feedback.

idle

Usage

import { Button } from "@mizen-labs/ui";

Examples

Icon action

Name the action with aria-label. Hide the decorative SVG from assistive technology.

Loading

Keep the action label stable. Loading blocks repeated activation and sets aria-busy.

Disabled

Explain unavailable actions near the control. Disabled buttons leave the keyboard tab order.

Release review

Northstar / Production

Action hierarchy

Use one strong action. Keep supporting commands quieter.

Destructive actions

Give destructive commands their own place, away from the main action.

Action states

Loading and unavailable actions keep their dimensions and labels.

Control sizes

Icon actions

Use a clear accessible name for each icon-only action.

Recommendations

GuidancePractice
Do

Use default or brand for the main action. Keep supporting actions quieter.

Do

Give icon buttons an aria-label. Hide decorative icons from assistive technology.

Do

Keep the label when loading. Loading blocks activation and preserves keyboard focus.

Do

Tab moves focus. Enter or Space activates an enabled button.

Do

Button supports Server Components. Add event handlers in a Client Component.

Usage boundaries

GuidanceBoundary
Scope

Use a link for navigation, including when composing with render.

Scope

Use Toggle for a persistent pressed state.

Scope

Use Alert Dialog when a destructive action needs confirmation.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
variant"default" | "brand" | "secondary" | "outline" | "ghost" | "link" | "destructive" | "destructive-outline""default"Sets the semantic appearance and interaction treatment.
size"xs" | "sm" | "default" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon" | "icon-lg" | "icon-xl""default"Sets control dimensions. Icon sizes require an accessible name.
loadingbooleanfalseShows progress while preserving the button width.
disabledbooleanfalsePrevents interaction and communicates the disabled state.
childrenReactNode—Visible label or icon content. Icon-only buttons need aria-label or aria-labelledby.
renderReactElement | RenderFunction—Composes button behavior onto another element.
nativeButtonbooleantrueDefaults to true; set false when render produces a non-button element.
type"button" | "submit" | "reset""button"Sets the native button type when render is not used.
PreviousVisually HiddenNextButton Group

A calmer workspace

Draft

The release notes are ready. Save your work or publish the update.

Ready for review