How to use React-Bootstrap component?
Example
Installing React-BootstrapIn the Terminal, run:
npm install --save react-bootstrap
Add below to my-app\public\index.html in your project's public folder to get the latest styles.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
my-app\src\App.js
import React, { Component } from 'react';
import { ButtonToolbar,Button } from 'react-bootstrap';
class App extends Component {
render() {
return (
<div>
<ButtonToolbar>
<Button bsStyle="primary" bsSize="large" disabled>
Primary button
</Button>
<Button bsSize="large" disabled>
Button
</Button>
</ButtonToolbar>
</div>
);
}
}
export default App;
Most Helpful This Week
Component displays Height and Width on window resize
How to render one component in another component in React JS?
React Static Website with Material UI theme
Using this keyword access component properties and methods
Integrate Bootstrap with ReactJS Application
How to use arrow function in React stateless components?
onClick Event binding and get event name in ReactJs
Loop inside React JSX
How to create Functional Component?
3 Different Examples - How State Works in React?