React Suite CheckPicker Placement
Last Updated :
28 Jun, 2022
React Suite is a front-end library designed for the middle platform and back-end products. React Suite CheckPicker component is used as multiple selectors of data. We can also group data using this component.
The placement of the React Suite CheckPicker component defines the position of the CheckPicker. It takes these values - 'bottomStart', 'bottomEnd', 'topStart', 'topEnd', 'leftStart', 'leftEnd', 'rightStart', 'rightEnd', 'auto', 'autoVerticalStart', 'autoVerticalEnd', 'autoHorizontalStart', 'autoHorizontalEnd'.
Syntax:
<CheckPicker placement=""/>
Prerequisite:
Creating React Application and Module installation:
Step 1: Create the react project folder, for that open the terminal, and write the command npm create-react-app folder name, if you have already installed create-react-app globally. If you haven’t, install create-react-app globally using the command npm -g create-react-app or install locally by npm i create-react-app.
npm create-react-app project
Step 2: After creating your project folder(i.e. project), move to it by using the following command.
cd project
Step 3:Â now install the dependency by using the following command:
npm install rsuite
Project Structure: It will look like this:
Â
Example 1: We are importing the CheckPicker Component from "rsuite" and to apply the default styles of the components we are importing "rsuite/dist/rsuite.min.css". Now to the CheckPicker component, we are passing different values to the placement prop.
App.js
import { CheckPicker } from "rsuite";
import "rsuite/dist/rsuite.min.css";
function App() {
const style = {
textAlign: "center",
};
return (
<div className="App">
<h4> React Suite CheckPicker Placement </h4>
<div style={style}>
<CheckPicker placement="topStart"
placeholder="topStart" />
<CheckPicker placement="topEnd"
placeholder="topEnd" />
<hr />
<CheckPicker placement="leftStart"
placeholder="leftStart" />
<CheckPicker placement="leftEnd"
placeholder="leftEnd" />
<hr />
<CheckPicker placement="rightStart"
placeholder="rightStart" />
<CheckPicker placement="rightEnd"
placeholder="rightEnd" />
<hr />
<CheckPicker placement="bottomStart"
placeholder="bottomStart" />
<CheckPicker placement="bottomEnd"
placeholder="bottomEnd" />
</div>
</div>
);
}
export default App;
Step to Run Application: Run the application using the following command from the project's root directory.
npm start
Output:
Â
Example 2: We are passing values like "auto","autoVerticalStart","autoVerticalEnd","autoHorizontalStart", and "autoHorizontalEnd" to the placement prop.
App.js
import { CheckPicker } from "rsuite";
import "rsuite/dist/rsuite.min.css";
function App() {
const style = {
textAlign: "center",
};
return (
<div className="App">
<h4> React Suite CheckPicker Placement </h4>
<div style={style}>
<CheckPicker placement="auto" placeholder="auto" />
<hr />
<CheckPicker
placement="autoVerticalStart"
placeholder="autoVerticalStart"
/>
<CheckPicker
placement="autoVerticalEnd"
placeholder="autoVerticalEnd"
/>
<hr />
<CheckPicker
placement="autoHorizontalStart"
placeholder="autoHorizontalStart"
/>
<CheckPicker
placement="autoHorizontalEnd"
placeholder="autoHorizontalEnd"
/>
<hr />
</div>
</div>
);
}
export default App;
Step to Run Application: Run the application using the following command from the project's root directory.
npm start
Output:
Â
Reference: https://rsuitejs.com/components/check-picker/#placement
Similar Reads
React Suite CheckPicker Props
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 <Checkpicker
5 min read
React Suite CheckPicker 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. CheckPicker component allows the user to select multiple data. This component also supports grouping. We can use the following approach in ReactJS to use the Rea
4 min read
React Suite CheckPicker Container and prevent overflow
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 Checkpicker Contai
5 min read
React Suite CheckPicker Controlled
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 Checkpicker contro
3 min read
React Suite CheckPicker Async
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 Checkpicker async.
3 min read
React Suite CheckPicker Extra footer
React Suite is a front-end library designed for the middle platform and back-end products. React Suite CheckPicker component is used as multiple selectors of data. We can also group data using this component. The renderExtraFooter in the React Suite CheckPicker provides a way to add an extra footer
3 min read
React Suite CheckPicker Custom Options
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 Checkpicker Custom
3 min read
React Suite CheckPicker Appearance
React Suite is a front-end library designed for the middle platform and back-end products. React Suite CheckPicker component is used as multiple selectors of data. We can also group data using this component. The appearance prop defines the way how the CheckPicker will visually appear to the users.
3 min read
React Suite CheckPicker Placement
React Suite is a front-end library designed for the middle platform and back-end products. React Suite CheckPicker component is used as multiple selectors of data. We can also group data using this component. The placement of the React Suite CheckPicker component defines the position of the CheckPic
3 min read
React Suite CheckPicker Group
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 Checkpicker Group.
3 min read