Convert Figma logo to code with AI

angular-ui logobootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!

14,291
6,734
14,291
336

Top Related Projects

170,434

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

Angular powered Bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)

6,431

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.

10,152

The Most Complete Angular UI Component Library

An enterprise-class UI design language and React UI library

Quick Overview

Angular UI Bootstrap is a popular library that provides native AngularJS directives for Bootstrap components. It eliminates the need for jQuery and Bootstrap's JavaScript, offering a pure AngularJS implementation of Bootstrap's functionality. This library allows developers to easily integrate Bootstrap's UI components into their AngularJS applications.

Pros

  • Native AngularJS implementation, reducing dependencies and potential conflicts
  • Seamless integration with AngularJS applications
  • Regularly updated and maintained by the community
  • Extensive documentation and examples available

Cons

  • Limited to AngularJS (not compatible with Angular 2+)
  • May have a steeper learning curve for developers new to AngularJS
  • Some components might not have all the features of their Bootstrap JavaScript counterparts
  • Performance can be affected in large applications with many directives

Code Examples

  1. Modal Dialog:
angular.module('myApp', ['ui.bootstrap'])
.controller('ModalCtrl', function ($uibModal) {
  $uibModal.open({
    templateUrl: 'myModalContent.html',
    controller: 'ModalInstanceCtrl'
  });
});
  1. Datepicker:
<p class="input-group">
  <input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
  <span class="input-group-btn">
    <button type="button" class="btn btn-default" ng-click="open()"><i class="glyphicon glyphicon-calendar"></i></button>
  </span>
</p>
  1. Accordion:
<uib-accordion>
  <div uib-accordion-group class="panel-default" heading="Section 1">
    Content for section 1
  </div>
  <div uib-accordion-group class="panel-default" heading="Section 2">
    Content for section 2
  </div>
</uib-accordion>

Getting Started

  1. Install the library using npm:
npm install angular-ui-bootstrap
  1. Include the necessary files in your HTML:
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="node_modules/angular/angular.min.js"></script>
<script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>
  1. Add the module dependency to your AngularJS app:
angular.module('myApp', ['ui.bootstrap']);
  1. Use UI Bootstrap directives in your HTML:
<uib-alert type="success" close="closeAlert()">
  Well done! You successfully read this important alert message.
</uib-alert>

Competitor Comparisons

170,434

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

Pros of Bootstrap

  • Broader compatibility across frameworks and vanilla JavaScript projects
  • More comprehensive CSS and design system, including utilities and layout components
  • Larger community and ecosystem, with extensive third-party themes and plugins

Cons of Bootstrap

  • Requires additional setup for Angular-specific features and directives
  • Heavier file size when including all components, potentially impacting load times
  • Less seamless integration with Angular's component-based architecture

Code Comparison

Bootstrap (HTML):

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropdown button
  </button>
  <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <a class="dropdown-item" href="#">Action</a>
    <a class="dropdown-item" href="#">Another action</a>
    <a class="dropdown-item" href="#">Something else here</a>
  </div>
</div>

Angular UI Bootstrap (Angular Template):

<div ngbDropdown class="d-inline-block">
  <button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>Toggle dropdown</button>
  <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
    <button ngbDropdownItem>Action - 1</button>
    <button ngbDropdownItem>Another Action</button>
    <button ngbDropdownItem>Something else is here</button>
  </div>
</div>

Angular powered Bootstrap

Pros of ng-bootstrap

  • Native Angular implementation, better integration with Angular ecosystem
  • Actively maintained and updated for newer Angular versions
  • Smaller bundle size and improved performance

Cons of ng-bootstrap

  • Fewer components and features compared to bootstrap
  • Less extensive documentation and community support
  • Steeper learning curve for developers familiar with jQuery-based bootstrap

Code Comparison

bootstrap:

angular.module('myApp', ['ui.bootstrap']);
$uibModal.open({
  templateUrl: 'myModalContent.html',
  controller: 'ModalInstanceCtrl'
});

ng-bootstrap:

import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

@NgModule({
  imports: [NgbModule]
})
export class AppModule { }

this.modalService.open(MyModalComponent);

Summary

ng-bootstrap offers a more Angular-centric approach with better performance and integration, while bootstrap provides a wider range of components and more extensive community support. The choice between the two depends on project requirements, team expertise, and desired level of Angular integration.

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)

Pros of ngx-bootstrap

  • Native Angular implementation, providing better integration and performance
  • Actively maintained with regular updates and new features
  • Supports Angular 2+ versions, including the latest Angular releases

Cons of ngx-bootstrap

  • Smaller community compared to bootstrap, potentially leading to fewer resources and third-party extensions
  • May have a steeper learning curve for developers familiar with the original Bootstrap JavaScript components

Code Comparison

bootstrap:

angular.module('ui.bootstrap').controller('ModalDemoCtrl', function ($uibModal) {
  var $ctrl = this;
  $ctrl.open = function () {
    var modalInstance = $uibModal.open({
      templateUrl: 'myModalContent.html',
      controller: 'ModalInstanceCtrl',
    });
  };
});

ngx-bootstrap:

import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';

export class DemoModalComponent {
  modalRef: BsModalRef;
  constructor(private modalService: BsModalService) {}
  openModal(template: TemplateRef<any>) {
    this.modalRef = this.modalService.show(template);
  }
}

The code comparison shows that ngx-bootstrap uses a more Angular-centric approach with TypeScript and dependency injection, while bootstrap relies on the AngularJS module system and controller pattern.

6,431

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.

Pros of Clarity

  • More comprehensive design system with a wider range of components
  • Better accessibility features and compliance with WCAG guidelines
  • Offers both Angular and Web Components versions for flexibility

Cons of Clarity

  • Steeper learning curve due to its more complex architecture
  • Less community-driven development and potentially slower updates
  • Larger file size and potential performance impact on smaller projects

Code Comparison

Bootstrap (Angular-UI):

<uib-accordion>
  <div uib-accordion-group heading="Section 1">
    Content for section 1
  </div>
  <div uib-accordion-group heading="Section 2">
    Content for section 2
  </div>
</uib-accordion>

Clarity:

<clr-accordion>
  <clr-accordion-panel>
    <clr-accordion-title>Section 1</clr-accordion-title>
    <clr-accordion-content>Content for section 1</clr-accordion-content>
  </clr-accordion-panel>
  <clr-accordion-panel>
    <clr-accordion-title>Section 2</clr-accordion-title>
    <clr-accordion-content>Content for section 2</clr-accordion-content>
  </clr-accordion-panel>
</clr-accordion>

Summary

Clarity offers a more comprehensive design system with better accessibility, but comes with a steeper learning curve and potentially slower updates. Bootstrap is more lightweight and community-driven but may lack some advanced features. The code comparison shows that Clarity's markup is more verbose but potentially more semantic. Choose based on project requirements, team expertise, and desired customization level.

10,152

The Most Complete Angular UI Component Library

Pros of PrimeNG

  • More comprehensive set of UI components, including complex widgets like data tables and charts
  • Active development with frequent updates and new features
  • Better TypeScript support and integration with Angular's ecosystem

Cons of PrimeNG

  • Steeper learning curve due to its extensive component library
  • Larger bundle size, which may impact initial load times
  • Some components may require additional configuration or customization

Code Comparison

PrimeNG example (Calendar component):

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: '<p-calendar [(ngModel)]="date"></p-calendar>'
})
export class AppComponent {
  date: Date;
}

Bootstrap example (Datepicker component):

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: '<datepicker [(ngModel)]="date"></datepicker>'
})
export class AppComponent {
  date: Date;
}

Both libraries provide similar functionality for common UI components, but PrimeNG offers a more extensive set of advanced components out of the box. Bootstrap focuses on providing a solid foundation for responsive design and basic UI elements, while PrimeNG aims to be a complete UI solution for Angular applications. The choice between the two depends on project requirements, desired customization level, and development team preferences.

An enterprise-class UI design language and React UI library

Pros of Ant Design

  • More comprehensive component library with a wider range of UI elements
  • Better support for React and TypeScript
  • More active development and frequent updates

Cons of Ant Design

  • Steeper learning curve due to its extensive API and customization options
  • Larger bundle size, which may impact initial load times

Code Comparison

Ant Design (React):

import { Button } from 'antd';

const MyComponent = () => (
  <Button type="primary">Click me</Button>
);

Bootstrap (AngularJS):

<button class="btn btn-primary" ng-click="onClick()">
  Click me
</button>

Key Differences

  • Ant Design is primarily for React applications, while Bootstrap is framework-agnostic but has specific Angular bindings
  • Ant Design offers a more modern and customizable design system
  • Bootstrap has a longer history and wider adoption across various frameworks

Use Cases

  • Choose Ant Design for React-based projects requiring a comprehensive, modern UI toolkit
  • Opt for Bootstrap when working with AngularJS or needing a lightweight, widely-supported CSS framework

Both libraries provide robust solutions for building responsive web applications, but cater to different ecosystems and design philosophies. The choice between them often depends on the specific project requirements, team expertise, and target framework.

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

Project Status (please read)

Due to Angular's continued adoption, our creation of the Angular version of this library, and the the project maintainers' moving on to other things, this project is considered feature-complete and is no longer being maintained.

We thank you for all your contributions over the years and hope you've enjoyed using this library as much as we've had developing and maintaining it. It would not have been successful without them.


UI Bootstrap - AngularJS directives specific to Bootstrap

Gitter Build Status devDependency Status CDNJS

Quick links

Demo

Do you want to see directives in action? Visit https://angular-ui.github.io/bootstrap/!

Angular 2

Are you interested in Angular 2? We are on our way! Check out ng-bootstrap.

Installation

Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required. Notes:

  • Since version 0.13.0, UI Bootstrap depends on ngAnimate for transitions and animations, such as the accordion, carousel, etc. Include ngAnimate in the module dependencies for your app in order to enable animation.
  • UI Bootstrap depends on ngTouch for swipe actions. Include ngTouch in the module dependencies for your app in order to enable swiping.

Angular Requirements

  • UI Bootstrap 1.0 and higher requires Angular 1.4.x or higher and it has been tested with Angular 1.4.8.
  • UI Bootstrap 0.14.3 is the last version that supports Angular 1.3.x.
  • UI Bootstrap 0.12.0 is the last version that supports Angular 1.2.x.

Bootstrap Requirements

  • UI Bootstrap requires Bootstrap CSS version 3.x or higher and it has been tested with Bootstrap CSS 3.3.6.
  • UI Bootstrap 0.8 is the last version that supports Bootstrap CSS 2.3.x.

Install with NPM

$ npm install angular-ui-bootstrap

This will install AngularJS and Bootstrap NPM packages.

Install with Bower

$ bower install angular-bootstrap

Note: do not install 'angular-ui-bootstrap'. A separate repository - bootstrap-bower - hosts the compiled javascript file and bower.json.

Install with NuGet

To install AngularJS UI Bootstrap, run the following command in the Package Manager Console

PM> Install-Package Angular.UI.Bootstrap

Custom build

Head over to https://angular-ui.github.io/bootstrap/ and hit the Custom build button to create your own custom UI Bootstrap build, just the way you like it.

Manual download

After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here: https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files Don't worry, if you are not sure which file to take, opt for ui-bootstrap-tpls-[version].min.js.

Adding dependency to your project

When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the ui.bootstrap AngularJS module:

angular.module('myModule', ['ui.bootstrap']);

Webpack / JSPM

To use this project with webpack, follow the NPM instructions. Now, if you want to use only the accordion, you can do:

import accordion from 'angular-ui-bootstrap/src/accordion';

angular.module('myModule', [accordion]);

You can import all the pieces you need in the same way:

import accordion from 'angular-ui-bootstrap/src/accordion';
import datepicker from 'angular-ui-bootstrap/src/datepicker';

angular.module('myModule', [accordion, datepicker]);

This will load all the dependencies (if any) and also the templates (if any).

Be sure to have a loader able to process css files like css-loader.

If you would prefer not to load your css through your JavaScript file loader/bundler, you can choose to import the index-nocss.js file instead, which is available for the modules:

  • carousel
  • datepicker
  • datepickerPopup
  • dropdown
  • modal
  • popover
  • position
  • timepicker
  • tooltip
  • typeahead

The other modules, such as accordion in the example below, do not have CSS resources to load, so you should continue to import them as normal:

import accordion from 'angular-ui-bootstrap/src/accordion';
import typeahead from 'angular-ui-bootstrap/src/typeahead/index-nocss.js';

angular.module('myModule', [accordion, typeahead]);

Versioning

Pre-2.0.0 does not follow a particular versioning system. 2.0.0 and onwards follows semantic versioning. All release changes can be viewed on our changelog.

Support

FAQ

https://github.com/angular-ui/bootstrap/wiki/FAQ

Code of Conduct

Take a moment to read our Code of Conduct

PREFIX MIGRATION GUIDE

If you're updating your application to use prefixes, please check the migration guide.

Supported browsers

Directives from this repository are automatically tested with the following browsers:

  • Chrome (stable and canary channel)
  • Firefox
  • IE 9 and 10
  • Opera
  • Safari

Modern mobile browsers should work without problems.

Need help?

Need help using UI Bootstrap?

Please do not create new issues in this repository to ask questions about using UI Bootstrap

Found a bug?

Please take a look at CONTRIBUTING.md and submit your issue here.


Contributing to the project

We are always looking for the quality contributions! Please check the CONTRIBUTING.md for the contribution guidelines.

Development, meeting minutes, roadmap and more.

Head over to the Wiki for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more.

NPM DownloadsLast 30 Days