Button
Pressable button with multiple variants and sizes. Composes @base-ui/react Button with focus management and disabled-while-loading.
import { Button } from "@brijbyte/agentic-ui/button";
import "@brijbyte/agentic-ui/button.css";
export default function RenderPropDemo() {
return (
// Render as <a> while keeping button behaviour and focus management.
// eslint-disable-next-line jsx-a11y/anchor-has-content
<Button variant="soft" nativeButton={false} render={<a href="/components/button" />}>
Anchor button
</Button>
);
}
Button
base-ui docs ↗Pressable button with multiple variants, tones, and sizes. Composes@base-ui/react Button with focus management and disabled-while-loading.
Supports a spinner overlay that preserves button width.
| Prop | Type | Default |
|---|---|---|
| variant | "solid" | "soft" | "outline" | "ghost" | solid |
Visual shape — filled, tinted, outlined, or borderless. | ||
| tone | "primary" | "secondary" | "destructive" | "success" | "warning" | primary |
Semantic colour. | ||
| size | "xs" | "sm" | "md" | "lg" | md |
Controls padding and font size. | ||
| loading | boolean | false |
Shows a spinner overlay and disables interaction. | ||
| loadingText | string | — |
Text shown in place of children while loading. | ||
| iconOnly | boolean | false |
Renders as a square button with equal padding on all sides. | ||
| render | ReactElement<unknown, string | JSXElementConstructor<any>> | — |
Custom render element forwarded to base-ui Button. | ||
| nativeButton | boolean | true |
Use a native | ||
CSS Class Names
Available as keys on the ButtonStyles object. Each key maps to a hashed CSS module class name at runtime.
content-loadingloaderloader-visiblerootsize-lgsize-mdsize-smsize-xsspinnertone-destructivetone-primarytone-secondarytone-successtone-warningvariant-ghostvariant-outlinevariant-softvariant-solid