1// Install react-bootstrap and bootstrap module
2npm i react-bootstrap bootstrap
3
4// Import bootstrap so that the styles work
5import 'bootstrap/dist/css/bootstrap.min.css';
6
7// Use react-bootstrap
8import { Button } from 'react-bootstrap'
9
10{ // Some Component
11 <Button /> // Displays a nice blue button :)
12}
11.run following commnad in cmd:
2npm install bootstrap --save
3
42.after install add this to index.js:
5import 'bootstrap/dist/css/bootstrap.min.css';
1*/ npm install react-bootstrap bootstrap
2import 'bootstrap/dist/css/bootstrap.min.css';
3
4import Button from 'react-bootstrap/Button';
5
6// or less ideally
7import { Button } from 'react-bootstrap';
8
9<>
10 <Button variant="primary">Primary</Button>{' '}
11 <Button variant="secondary">Secondary</Button>{' '}
12 <Button variant="success">Success</Button>{' '}
13 <Button variant="warning">Warning</Button>{' '}
14 <Button variant="danger">Danger</Button> <Button variant="info">Info</Button>{' '}
15 <Button variant="light">Light</Button> <Button variant="dark">Dark</Button>{' '}
16 <Button variant="link">Link</Button>
17</>
1{/* The following line can be included in your src/index.js or App.js file*/}
2import 'bootstrap/dist/css/bootstrap.min.css';