Skip to main content

Buttons

Use Bootstrap’s custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.

Examples

Use any of the available button style types to quickly create a styled button. Just modify the variant prop.

Result
Loading...
Live Editor

Outline buttons

For a lighter touch, Buttons also come in outline-* variants with no background color.

Result
Loading...
Live Editor

Button tags

Normally <Button> components will render a HTML <button> element. However you can render whatever you'd like, adding a href prop will automatically render an <a /> element. You can use the as prop to render whatever your heart desires. React Bootstrap will take care of the proper ARIA roles for you.

Result
Loading...
Live Editor

Block buttons

Create responsive stacks of full-width, “block buttons” like those in Bootstrap 4 with a mix of our display and gap utilities.

Result
Loading...
Live Editor

Active state

To set a button's active state simply set the component's active prop.

Result
Loading...
Live Editor

Disabled state

Make buttons look inactive by adding the disabled prop to.

Result
Loading...
Live Editor

Checkbox / Radio

Buttons can also be used to style checkbox and radio form elements. This is helpful when you want a toggle button that works neatly inside an HTML form.

Result
Loading...
Live Editor

The above handles styling, But requires manually controlling the checked state for each radio or checkbox in the group.

For a nicer experience with checked state management use the <ToggleButtonGroup> instead of a <ButtonGroup> component. The group behaves as a form component, where the value is an array of the selected values for a named checkbox group or the single toggled value in a similarly named radio group.

Uncontrolled

Result
Loading...
Live Editor

Controlled

Result
Loading...
Live Editor

API

Button

ToggleButtonGroup

ToggleButton