Button
StableButtons 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.
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
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "secondary" | "tertiary" | "ghost" | "accent" | "primary" | Visual style variant |
| size | "sm" | "md" | "lg" | "xl" | "md" | Button size |
| icon | ReactNode | undefined | Icon element to display |
| iconPosition | "leading" | "trailing" | "leading" | Position of the icon relative to the label |
| iconOnly | boolean | false | Icon-only mode (square button, no label) |
| isLoading | boolean | false | Shows a loading spinner and disables the button |
| showTextWhileLoading | boolean | false | Keep the label visible alongside the spinner |
| disabled | boolean | false | Disabled state with reduced opacity |
| fullWidth | boolean | false | Whether button spans full container width |