Bootstrap 5 file upload inputs let users select files from their device. This page covers 4 file upload patterns — basic, multiple files, drag and drop zone and image preview — each ready to use in your forms.
Quick Setup
File inputs need only Bootstrap 5 CSS:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
Key Classes Reference
| Class / Attribute | What It Does |
|---|---|
.form-control | Styles the file input |
.form-control-sm | Small file input |
.form-control-lg | Large file input |
type="file" | Creates file input element |
multiple | Allows selecting multiple files |
accept="image/*" | Restricts to image files |
accept=".pdf,.doc" | Restricts to specific extensions |
1. Basic Bootstrap 5 File Input
Standard file inputs in default, small and large sizes using form-control.
2. Bootstrap 5 Multiple File Upload
Allow uploading multiple files at once using the multiple attribute. Restrict file types with accept.
3. Bootstrap 5 Drag and Drop Upload Zone
A styled drag-and-drop upload area. Files can be dragged in or selected via click.
4. Bootstrap 5 File Upload with Image Preview
File input that shows a preview of the selected image before upload.
Frequently Asked Questions
Need a Full Bootstrap 5 Admin Dashboard?
Get a complete Angular 21 + Bootstrap 5 dashboard with 50+ components — built by the same team behind BootstrapPlanet.
Browse Templates →Use code FIRST30 for 30% off your first purchase.