Button
Result
Loading...
Live Editor
<divstyle={{display: 'grid',gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',gridGap: '0.1rem',}}>{['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'link'].map((variant) => (<Button key={variant} variant={variant} className="me-2 mb-2">{variant}</Button>),)}</div>
Outline variants
Result
Loading...
Live Editor
<divstyle={{display: 'grid',gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',gridGap: '0.1rem',}}>{['outline-primary','outline-secondary','outline-success','outline-danger','outline-warning','outline-info','outline-light','outline-dark',].map((variant) => (<Button key={variant} variant={variant} className="me-2 mb-2">{variant}</Button>))}</div>
Radius variants
Result
Loading...
Live Editor
<>{['square', 'rounded', 'pill'].map((radius) => (<Button key={radius} radius={radius} className="me-2 mb-2">{radius}</Button>))}</>
Size variants
Result
Loading...
Live Editor
<>{['lg', 'sm'].map((variant) => (<Button key={variant} size={variant} className="me-2 mb-2">{variant} Size</Button>))}</>
Block buttons
Create responsive stacks of full-width, “block buttons” with a mix of display and gap utilities.
Result
Loading...
Live Editor
<div className="d-grid gap-2"><Button variant="primary" size="lg">Block level button</Button><Button variant="secondary" size="lg">Block level button</Button></div>
Icons
Result
Loading...
Live Editor
<><Button className="me-3"><span className="icon-bookmark-add me-2" />Add bookmark</Button><Button variant="danger">Remove user<span className="icon-user-edit ms-2" /></Button></>
Loading
Result
Loading...
Live Editor
function LoadingButton({ variant, ...restProps }) {const [count, setCount] = useState(1);const [isLoading, setLoading] = useState(false);useEffect(() => {if (isLoading) {setTimeout(() => {setLoading(false);}, 2000);}}, [isLoading]);const handleClick = () => {setLoading(true);setCount(count * 10);};return (<Buttonvariant={variant}loading={isLoading}disabled={isLoading}onClick={!isLoading ? handleClick : null}{...restProps}>{isLoading ? 'Loading…' : `Click to load ${count}`}</Button>);}render(['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'link'].map((variant) => <LoadingButton key={variant} variant={variant} className="me-2 mb-2" />,),);