Button

Stable

Buttons trigger actions. Use them for form submissions, navigation, and interactive elements. Available in primary, secondary, and tertiary variants with four sizes.

Primary Button

Solid lime background for the most important actions. Available in four sizes.

Primary — All Sizes

Secondary Button

Bordered button with a subtle glass background. Use for secondary actions alongside a primary button.

Secondary — All Sizes

Tertiary Button

Text-only button with no background or border. Use for low-emphasis actions like "Cancel" or inline links.

Tertiary — All Sizes

Icon Leading

Button with an icon placed before the text label. Use for actions that benefit from a visual cue.

Icon Leading

Icon Trailing

Button with an icon placed after the text label. Common for "Next" or "Continue" actions.

Icon Trailing

Loading State

Buttons can show a loading spinner. Use showTextWhileLoading to keep the label visible alongside the spinner.

Loading — Spinner Only

Loading — With Text (Primary)

Loading — With Text (Secondary)

Loading — With Text (Tertiary)

Disabled State

Disabled buttons have reduced opacity and no pointer events. All variants support the disabled state.

Disabled — All Variants

Disabled — All Sizes (Primary)

Full Width

Buttons can span the full width of their container.

Full Width

Usage

Import the Button component and use it in your application.

tsx
import { Button } from "omnira-ui/Button";
import { ArrowRight2 } from "iconsax-react";

export default function MyPage() {
    return (
        <div>
            <Button variant="primary" size="lg">
                Get Started
            </Button>

            <Button
                variant="secondary"
                icon={<ArrowRight2 size={18} />}
                iconPosition="trailing"
            >
                Continue
            </Button>

            <Button variant="primary" isLoading showTextWhileLoading>
                Saving...
            </Button>
        </div>
    );
}

Props

PropTypeDefaultDescription
variant"primary" | "secondary" | "tertiary" | "ghost" | "accent""primary"Visual style variant
size"sm" | "md" | "lg" | "xl""md"Button size
iconReactNodeundefinedIcon element to display
iconPosition"leading" | "trailing""leading"Position of the icon relative to the label
iconOnlybooleanfalseIcon-only mode (square button, no label)
isLoadingbooleanfalseShows a loading spinner and disables the button
showTextWhileLoadingbooleanfalseKeep the label visible alongside the spinner
disabledbooleanfalseDisabled state with reduced opacity
fullWidthbooleanfalseWhether button spans full container width