Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ng2-bootstrap-card

fleskesvor86ISC1.0.2TypeScript support: included

Angular 2 Bootstrap card component

angular2, bootstrap, card, ng2-card

readme

ng2-card

Use Bootstrap cards with Angular 2 and less boilerplate HTML.

Prerequisites

Install the 'ng2-card' module:

npm install --save ng2-bootstrap-card

Declare the card component in a module where you want to use it:

import { CardComponent } from 'ng2-bootstrap-card/ng2-bootstrap-card';
...
@NgModule({
  ...
  declarations: [
    ...
    CardComponent
  ]
  ...
})

To use with a module loader like SystemJS, add the module to your config file, eg:

System.config({
  ...
  map: {
    ...
    'ng2-bootstrap-card': 'node_modules/ng2-bootstrap-card/'
  },
  packages: {
    ...
    'ng2-bootstrap-card': {
      defaultExtension: 'js'
    }
  }
});

Include Bootstrap v4 CSS in your index.html file.

Usage

A minimal example:

<card>
  This is a Bootstrap card
</card>

TODOs

  • Add more card features
  • Add directives for more customizations
  • Consider setting margin: 0px on last-child of '.card-text' elements