DocsReact UIui-primitivesButton
Package: @hexos/react-ui

Styled button component with variant and size presets.

Provides consistent button styling across the Hexos UI system. Supports Radix UI Slot pattern for composition with other components (e.g., rendering as a Link).

When asChild is true, the button renders its single child and merges props, enabling polymorphic behavior without wrapper elements.

Example

<Button variant="default" size="lg" onClick={handleClick}>
  Submit
</Button>

Example

Using Radix Slot pattern

<Button asChild variant="outline">
<a href="/link">Navigate</a>
</Button>