We can add many things to input groups.React Bootstrap is one version of Bootstrap made for React. It’s a set of React components that have Bootstrap styles. In this article, we’ll look at how to add input groups to a React app with React Bootstrap.
React Bootstrap is one version of Bootstrap made for React.
It’s a set of React components that have Bootstrap styles.
In this article, we’ll look at how to add input groups to a React app with React Bootstrap.
We can add checkboxes and radio buttons to input groups.
To do this, we can use the InputGrou.Checkbox
and InputGroup.Radio
components respectively.
For instance, we can write:
import React from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import InputGroup from "react-bootstrap/InputGroup";
import FormControl from "react-bootstrap/FormControl";
export default function App() {
return (
<div>
<InputGroup className="mb-3">
<InputGroup.Prepend>
<InputGroup.Checkbox/>
</InputGroup.Prepend>
<FormControl />
</InputGroup>
<InputGroup>
<InputGroup.Prepend>
<InputGroup.Radio />
</InputGroup.Prepend>
<FormControl />
</InputGroup>
</div>
);
}
We just add them inside the InputGroup.Prepend
component to add them to the left of the input box.
We can have multiple controls in one input group.
We just add them all into the InputGroup
.
For example, we can write:
import React from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import InputGroup from "react-bootstrap/InputGroup";
import FormControl from "react-bootstrap/FormControl";
export default function App() {
return (
<div>
<InputGroup className="mb-3">
<InputGroup.Prepend>
<InputGroup.Text>name and age</InputGroup.Text>
</InputGroup.Prepend>
<FormControl />
<FormControl />
</InputGroup>
</div>
);
}
technology javascript software-development web-development programming
To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.
Software Developer vs Web Developer | Difference Web Developer & Software Developer | Software development and web development are normally used interchangeably. Although both include development, a software developer has different responsibilities from that of a web developer.
Vinew Technologies focused majorly over ERP Software services and POS Software services, Web & Application development services & Woo commerce and Wordpress easy-to-use, multipurpose social media plugin for WordPress.
Check out these five criteria for the selection of your software vendor, and you will never regret having the wrong quality product made for you.
Mobiweb Technologies is a prestigious IT company headquartered in Indore providing promising and cost effective software and web development services across the globe.