React Suite Button Component
Last Updated :
10 Apr, 2023
React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Button Component allows the user to take actions, and make choices, with a single tap. We can use the following approach in ReactJS to use the React Suite Button Component.
Button Props:
- active: It is used to change the button state to active.
- appearance: It is used to denote the appearance of the button.
- block: It is used to span the full width of the Button parent.
- children: It is used to denote the primary content.
- classPrefix: It is used to denote the prefix of the component CSS class.
- color: It is used to denote the color of the button.
- componentClass: It is used to pass a custom element for this component.
- disabled: It is used to change the button state to disable.
- href: It is used for providing a href attribute.
- loading: It is used to show a loading indicator.
- size: It is used to denote the size of the button.
IconButton Props:
- circle: It is used to set the circle button.
- classPrefix: It is used to denote the prefix of the component CSS class.
- icon: It is used to set the icon of the button.
- placement: It is used for the placement of icon.
ButtonGroup Props:
- block: It is used to display block button groups.
- classPrefix: It is used to denote the prefix of the component CSS class.
- justified: It is used for the horizontal constant width layout
- size: It is used to denote the size of the button.
- vertical: It is used for the vertical layouts of button
Creating React Application And Installing Module:
Step 1: Create a React application using the following command:
npx create-react-app foldername
Step 2: After creating your project folder i.e. foldername, move to it using the following command:
cd foldername
Step 3: After creating the ReactJS application, Install the required module using the following command:
npm install rsuite
Project Structure: It will look like the following.
Project StructureExample: Now write down the following code in the App.js file. Here, App is our default component where we have written our code.
Filename: App.js
javascript
import React from 'react'
import 'rsuite/dist/styles/rsuite-default.css';
import { Button } from 'rsuite'
export default function App() {
return (
<div style={{
display: 'block', width: 700, paddingLeft: 30
}}>
<h4>React Suite Button Component</h4>
<Button appearance="primary">Primary Button</Button> <br></br>
<Button appearance="link">Link Button</Button> <br></br>
<Button appearance="default">Default Button</Button> <br></br>
<Button appearance="ghost">Ghost Button</Button> <br></br>
<Button appearance="subtle">Subtle Button</Button>
</div>
);
}
Step to Run Application: Run the application using the following command from the root directory of the project:
npm start
Output: Now open your browser and go to http://localhost:3000/, you will see the following output:

Example 2
In this example, we will learn how can we make equal width buttons . This can be achieved by making justified buttons.
JavaScript
import React from 'react'
import { Button } from 'rsuite'
import ButtonGroup from 'rsuite/ButtonGroup';
import ButtonToolbar from 'rsuite/ButtonToolbar';
import "rsuite/dist/rsuite.min.css";
export default function App() {
return (
<div >
<h1 style={{color:'green'}}>GeeksforGeeks</h1>
<h3>React Suite Button Component</h3>
<ButtonGroup justified>
<Button appearance="primary">Top</Button>
<Button appearance="subtle">Middle</Button>
<Button appearance="ghost">Bottom</Button>
</ButtonGroup>
</div>
);
}
Â
OUTPUT
 Reference: https://rsuitejs.com/components/button/
Similar Reads
React Suite Button Color React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The Button component is used to fire an action when the user clicks the button. In this article, we will be discussing the React Suite Button Color. To change th
3 min read
React Suite Button Icon React Suite Button Icon allows to use of an Icon as a Button. The Button component is used to fire an action when the user clicks the button. React Suite Button IconButton Icon component is used when we want to use an icon as a button, It has an icon property that is used to specify the icon of the
3 min read
React Suite Button Active React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The Button component is used to fire an action when the user clicks the button. In this article, we will be learning about the React Suite Button Active. To mak
3 min read
React Suite Button Size React Suite is a front-end library designed for the middle platform and back-end products. Button Component allows the user to interact with the webpage. The Button Component has a number of properties of its own like appearance, size, color, etc. Here we will look into the size property. Size Prop
2 min read
React Suite Loading Button React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The Button component is used to fire an action when the user clicks on it. In this article, we will be seeing React Suite Loading button. The loading button is
3 min read
React Suite Button ts:Color Props React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The Button component is used to fire an action when the user clicks the button. ts:Color props are used to provide different colors to the Buttons. It provides d
2 min read
React Suite Buttons Props React Suite is a front-end library designed for the middle platform and back-end products. Button Component allows the user to interact with the webpage. The Button Component has a number of properties of its own like appearance, size, color, etc. The props are: active: It is a boolean value. It de
4 min read
React Suite Button Component React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Button Component allows the user to take actions, and make choices, with a single tap. We can use the following approach in ReactJS to use the React Suite Button
3 min read
React Suite Split Button React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Button Component allows the user to take actions, and make choices, with a single tap. There are different ways to define a button. A split button is used to mak
3 min read
React Suite Button toolbar React suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application. In this article, we'll learn about React suite Button toolbar. A
3 min read