Button

Buttons prompt most actions in a UI

Usage

The Button component can trigger an action or navigate to a link. Import it from the @udixio/ui-react package and provide at least a label via the label prop.

import { Button } from "@udixio/ui-react"
<Button>Button</Button>

Variants

Toggle buttons

Make a button togglable by providing onToggle and controlling its state with activated.

Note: When used as a toggle button, accessibility is handled via aria-pressed automatically.

Disabled state

Use the disabled prop to make the button inactive.

Sizes

Shapes

Control the button’s appearance via the shape prop.

Icon

You can add an icon (FontAwesome) and choose its position.

Loading state

If the href prop is provided, the component renders an <a> link; otherwise it renders a <button>.