Reactjs Material-UI ButtonGroup component
YouTube Video:
Example usage:
Create one Reactjs project with Material-UI integrated. Update your App.js file as below:
import { ButtonGroup,Button } from "@material-ui/core";import "./App.css";function App() {return (<div className="App"><ButtonGroup color='primary' variant='outlined'><Button>First</Button><Button>Second</Button><Button>Third</Button></ButtonGroup><ButtonGroup style={{marginLeft: '30px'}} color='secondary' variant='contained' orientation='vertical'><Button>First</Button><Button>Second</Button><Button>Third</Button></ButtonGroup></div>);}export default App;
We are creating two ButtonGroup components here. Both have different colors, variant, and orientation.
It will given the below output: