xxxxxxxxxx
1.run following commnad in cmd:
npm install bootstrap --save
2.after install add this to index.js:
import 'bootstrap/dist/css/bootstrap.min.css';
xxxxxxxxxx
// Install react-bootstrap and bootstrap module
npm i react-bootstrap bootstrap
// Import bootstrap so that the styles work
import 'bootstrap/dist/css/bootstrap.min.css';
// Use react-bootstrap
import { Button } from 'react-bootstrap'
{ // Some Component
<Button /> // Displays a nice blue button :)
}
React bootstrap
xxxxxxxxxx
// Install react-bootstrap and bootstrap module
npm i react-bootstrap bootstrap
// Import bootstrap so that the styles work
import 'bootstrap/dist/css/bootstrap.min.css';
// Use react-bootstrap
import { Button } from 'react-bootstrap'
{ // Some Component
<Button /> // Displays a nice blue button :)
}
xxxxxxxxxx
*/ npm install react-bootstrap bootstrap
import 'bootstrap/dist/css/bootstrap.min.css';
import Button from 'react-bootstrap/Button';
// or less ideally
import { Button } from 'react-bootstrap';
<>
<Button variant="primary">Primary</Button>{' '}
<Button variant="secondary">Secondary</Button>{' '}
<Button variant="success">Success</Button>{' '}
<Button variant="warning">Warning</Button>{' '}
<Button variant="danger">Danger</Button> <Button variant="info">Info</Button>{' '}
<Button variant="light">Light</Button> <Button variant="dark">Dark</Button>{' '}
<Button variant="link">Link</Button>
</>
xxxxxxxxxx
### Installation ###
npm install react-bootstrap@next bootstrap@5.0.2
xxxxxxxxxx
{/* The following line can be included in your src/index.js or App.js file*/}
import 'bootstrap/dist/css/bootstrap.min.css';