Convert Figma logo to code with AI

twbs logobootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

169,947
78,737
169,947
611

Top Related Projects

A utility-first CSS framework for rapid UI development.

Semantic is a UI component framework based around useful principles from natural language.

49,128

Modern CSS framework based on Flexbox

Materialize, a CSS Framework based on Material Design

18,271

A lightweight and modular front-end framework for developing fast and powerful web interfaces

Quick Overview

Bootstrap is a popular open-source front-end framework for developing responsive and mobile-first websites. It provides a comprehensive set of pre-built components, CSS styles, and JavaScript plugins that simplify the process of creating modern, visually appealing web interfaces.

Pros

  • Rapid development: Bootstrap's pre-built components and grid system allow for quick prototyping and development of responsive websites.
  • Consistent design: The framework ensures a uniform look and feel across different browsers and devices.
  • Extensive documentation: Bootstrap offers comprehensive documentation and examples, making it easy for developers to learn and implement.
  • Large community: With a vast user base, Bootstrap benefits from regular updates, third-party extensions, and community support.

Cons

  • Generic appearance: Websites built with Bootstrap can look similar if not customized, leading to a lack of uniqueness.
  • Steep learning curve: For beginners, understanding and customizing Bootstrap's extensive features can be challenging.
  • Overhead: Including the entire Bootstrap library may add unnecessary weight to smaller projects that don't require all features.
  • Dependency on jQuery: Although Bootstrap 5 has removed the jQuery dependency, many existing projects and plugins still rely on it.

Code Examples

  1. Creating a responsive grid layout:
<div class="container">
  <div class="row">
    <div class="col-md-4">Column 1</div>
    <div class="col-md-4">Column 2</div>
    <div class="col-md-4">Column 3</div>
  </div>
</div>
  1. Adding a button with an icon:
<button class="btn btn-primary">
  <i class="bi bi-heart"></i> Like
</button>
  1. Creating a responsive navigation bar:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Logo</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav">
        <li class="nav-item"><a class="nav-link" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">About</a></li>
        <li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
      </ul>
    </div>
  </div>
</nav>

Getting Started

To start using Bootstrap in your project, include the following CSS and JavaScript files in your HTML:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Bootstrap Example</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
  <!-- Your content here -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

Now you can start using Bootstrap classes and components in your HTML markup.

Competitor Comparisons

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Highly customizable with a utility-first approach
  • Smaller file size when purging unused styles
  • Faster development with pre-built utility classes

Cons of Tailwind CSS

  • Steeper learning curve for developers used to traditional CSS
  • Can lead to longer class names in HTML
  • Less out-of-the-box styling compared to Bootstrap

Code Comparison

Bootstrap:

<button class="btn btn-primary">Click me</button>

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Click me
</button>

Both Bootstrap and Tailwind CSS are popular front-end frameworks, but they take different approaches to styling. Bootstrap provides pre-designed components and a grid system, making it easier for beginners to create responsive layouts quickly. Tailwind CSS, on the other hand, offers a utility-first approach, giving developers more flexibility and control over their designs.

While Bootstrap has a larger community and more extensive documentation, Tailwind CSS has gained popularity for its customizability and performance benefits. The choice between the two often depends on project requirements, team preferences, and development speed priorities.

Semantic is a UI component framework based around useful principles from natural language.

Pros of Semantic UI

  • More intuitive class naming convention, making it easier for developers to understand and use
  • Offers a wider range of UI components and themes out of the box
  • Provides better customization options through its theming system

Cons of Semantic UI

  • Smaller community and less frequent updates compared to Bootstrap
  • Steeper learning curve for developers already familiar with Bootstrap
  • Larger file size, which may impact page load times

Code Comparison

Semantic UI button:

<button class="ui primary button">
  Click me
</button>

Bootstrap button:

<button class="btn btn-primary">
  Click me
</button>

Both frameworks offer similar functionality, but Semantic UI's class naming is more descriptive and self-explanatory. However, Bootstrap's approach is more concise and widely recognized.

Semantic UI uses a more hierarchical structure in its class names (e.g., "ui primary button"), while Bootstrap opts for a flatter structure (e.g., "btn btn-primary"). This difference reflects their overall design philosophies and can impact how developers interact with the frameworks.

49,128

Modern CSS framework based on Flexbox

Pros of Bulma

  • Lightweight and modular, with a smaller file size than Bootstrap
  • Flexbox-based, providing more flexible and modern layouts
  • Simple and intuitive class naming conventions

Cons of Bulma

  • Smaller community and ecosystem compared to Bootstrap
  • Fewer pre-built components and JavaScript functionality
  • Less extensive browser support, especially for older versions

Code Comparison

Bulma:

<div class="columns">
  <div class="column">
    <div class="notification is-primary">First column</div>
  </div>
  <div class="column">
    <div class="notification is-info">Second column</div>
  </div>
</div>

Bootstrap:

<div class="row">
  <div class="col">
    <div class="alert alert-primary">First column</div>
  </div>
  <div class="col">
    <div class="alert alert-info">Second column</div>
  </div>
</div>

Both frameworks offer grid systems and component classes, but Bulma uses more semantic class names (e.g., columns and column) compared to Bootstrap's generic row and col. Bulma's modifiers like is-primary are also more intuitive than Bootstrap's alert-primary.

Materialize, a CSS Framework based on Material Design

Pros of Materialize

  • Follows Google's Material Design principles, offering a modern and cohesive look
  • Includes unique components like cards, parallax, and toast notifications
  • Lighter weight and faster to load than Bootstrap

Cons of Materialize

  • Smaller community and fewer third-party resources compared to Bootstrap
  • Less frequent updates and potentially slower bug fixes
  • More opinionated design, which may limit customization options

Code Comparison

Bootstrap:

<div class="container">
  <div class="row">
    <div class="col-md-4">Column 1</div>
    <div class="col-md-4">Column 2</div>
    <div class="col-md-4">Column 3</div>
  </div>
</div>

Materialize:

<div class="container">
  <div class="row">
    <div class="col s4">Column 1</div>
    <div class="col s4">Column 2</div>
    <div class="col s4">Column 3</div>
  </div>
</div>

Both frameworks use a similar grid system, but Materialize uses s, m, and l for screen sizes instead of Bootstrap's sm, md, and lg. Materialize also defaults to a 12-column grid, while Bootstrap allows for more flexibility in column numbers.

18,271

A lightweight and modular front-end framework for developing fast and powerful web interfaces

Pros of UIkit

  • More lightweight and modular, allowing for easier customization
  • Offers a wider range of pre-built components and layouts
  • Provides a more modern and sleek design aesthetic out of the box

Cons of UIkit

  • Smaller community and ecosystem compared to Bootstrap
  • Less extensive documentation and third-party resources
  • Steeper learning curve for developers new to the framework

Code Comparison

UIkit:

<div class="uk-card uk-card-default">
    <div class="uk-card-body">
        <h3 class="uk-card-title">Card Title</h3>
        <p>Card content goes here.</p>
    </div>
</div>

Bootstrap:

<div class="card">
    <div class="card-body">
        <h5 class="card-title">Card Title</h5>
        <p class="card-text">Card content goes here.</p>
    </div>
</div>

Both frameworks offer similar component structures, but UIkit uses the uk- prefix for its classes, while Bootstrap uses more generic class names. UIkit's approach can help prevent naming conflicts in larger projects, but may require more typing.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Bootstrap logo

Bootstrap

Sleek, intuitive, and powerful front-end framework for faster and easier web development.
Explore Bootstrap docs »

Report bug · Request feature · Themes · Blog

Bootstrap 5

Our default branch is for development of our Bootstrap 5 release. Head to the v4-dev branch to view the readme, documentation, and source code for Bootstrap 4.

Table of contents

Quick start

Several quick start options are available:

  • Download the latest release
  • Clone the repo: git clone https://github.com/twbs/bootstrap.git
  • Install with npm: npm install bootstrap@v5.3.3
  • Install with yarn: yarn add bootstrap@v5.3.3
  • Install with Composer: composer require twbs/bootstrap:5.3.3
  • Install with NuGet: CSS: Install-Package bootstrap Sass: Install-Package bootstrap.sass

Read the Getting started page for information on the framework contents, templates, examples, and more.

Status

Build Status npm version Gem version Meteor Atmosphere Packagist Prerelease NuGet Coverage Status CSS gzip size CSS Brotli size JS gzip size JS Brotli size Backers on Open Collective Sponsors on Open Collective

What's included

Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.

Download contents
bootstrap/
├── css/
│   ├── bootstrap-grid.css
│   ├── bootstrap-grid.css.map
│   ├── bootstrap-grid.min.css
│   ├── bootstrap-grid.min.css.map
│   ├── bootstrap-grid.rtl.css
│   ├── bootstrap-grid.rtl.css.map
│   ├── bootstrap-grid.rtl.min.css
│   ├── bootstrap-grid.rtl.min.css.map
│   ├── bootstrap-reboot.css
│   ├── bootstrap-reboot.css.map
│   ├── bootstrap-reboot.min.css
│   ├── bootstrap-reboot.min.css.map
│   ├── bootstrap-reboot.rtl.css
│   ├── bootstrap-reboot.rtl.css.map
│   ├── bootstrap-reboot.rtl.min.css
│   ├── bootstrap-reboot.rtl.min.css.map
│   ├── bootstrap-utilities.css
│   ├── bootstrap-utilities.css.map
│   ├── bootstrap-utilities.min.css
│   ├── bootstrap-utilities.min.css.map
│   ├── bootstrap-utilities.rtl.css
│   ├── bootstrap-utilities.rtl.css.map
│   ├── bootstrap-utilities.rtl.min.css
│   ├── bootstrap-utilities.rtl.min.css.map
│   ├── bootstrap.css
│   ├── bootstrap.css.map
│   ├── bootstrap.min.css
│   ├── bootstrap.min.css.map
│   ├── bootstrap.rtl.css
│   ├── bootstrap.rtl.css.map
│   ├── bootstrap.rtl.min.css
│   └── bootstrap.rtl.min.css.map
└── js/
    ├── bootstrap.bundle.js
    ├── bootstrap.bundle.js.map
    ├── bootstrap.bundle.min.js
    ├── bootstrap.bundle.min.js.map
    ├── bootstrap.esm.js
    ├── bootstrap.esm.js.map
    ├── bootstrap.esm.min.js
    ├── bootstrap.esm.min.js.map
    ├── bootstrap.js
    ├── bootstrap.js.map
    ├── bootstrap.min.js
    └── bootstrap.min.js.map

We provide compiled CSS and JS (bootstrap.*), as well as compiled and minified CSS and JS (bootstrap.min.*). Source maps (bootstrap.*.map) are available for use with certain browsers' developer tools. Bundled JS files (bootstrap.bundle.js and minified bootstrap.bundle.min.js) include Popper.

Bugs and feature requests

Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Documentation

Bootstrap's documentation, included in this repo in the root directory, is built with Hugo and publicly hosted on GitHub Pages at https://getbootstrap.com/. The docs may also be run locally.

Documentation search is powered by Algolia's DocSearch.

Running documentation locally

  1. Run npm install to install the Node.js dependencies, including Hugo (the site builder).
  2. Run npm run test (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
  3. From the root /bootstrap directory, run npm run docs-serve in the command line.
  4. Open http://localhost:9001/ in your browser, and voilà.

Learn more about using Hugo by reading its documentation.

Documentation for previous releases

You can find all our previous releases docs on https://getbootstrap.com/docs/versions/.

Previous releases and their documentation are also available for download.

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the Code Guide, maintained by Mark Otto.

Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at https://editorconfig.org/.

Community

Get updates on Bootstrap's development and chat with the project maintainers and community members.

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we adhere to those rules whenever possible.

See the Releases section of our GitHub project for changelogs for each release version of Bootstrap. Release announcement posts on the official Bootstrap blog contain summaries of the most noteworthy changes made in each release.

Creators

Mark Otto

Jacob Thornton

Thanks

BrowserStack

Thanks to BrowserStack for providing the infrastructure that allows us to test in real browsers!

Netlify

Thanks to Netlify for providing us with Deploy Previews!

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

OC sponsor 0 OC sponsor 1 OC sponsor 2 OC sponsor 3 OC sponsor 4 OC sponsor 5 OC sponsor 6 OC sponsor 7 OC sponsor 8 OC sponsor 9

Backers

Thank you to all our backers! 🙏 [Become a backer]

Backers

Copyright and license

Code and documentation copyright 2011–2024 the Bootstrap Authors. Code released under the MIT License. Docs released under Creative Commons.

NPM DownloadsLast 30 Days