Button
Basic Usage
import { Button } from "@ronin-nexus/atomic";
<Button>Hello</Button>;| Props | Type | Type |
|---|---|---|
| variant? | Variant | Design system variant |
| size? | Size | Button size |
| mode? | Mode | Button mode |
| startIcon? | JSX.Element | Icon at start position |
| endIcon? | JSX.Element | Icon at the end position |
| icon? | boolean | Use Button as IconButton (render icon only) |
| text? | string | Render children as text |
| asChild? | boolean | Merges its props onto its immediate child. |
Variants
Type: brand | gray | info | danger | warn | success
Default: brand
Size
Type: xs | sm | base | lg
Default: xs
Mode
Type: solid | light | ghost
Default: solid
light
light
Large
Icons
Start Icon End Icon IconDisabled Buttons
<Button disabled>Button</Button>Loading Button
<Button loading>Button</Button>As child
<Button asChild>
<Link to="/login">Login</Link>
</Button>Login