GithubHelp home page GithubHelp logo

gerhobbelt / bespoke-bullets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bespokejs/bespoke-bullets

0.0 1.0 0.0 358 KB

Bullet Lists for Bespoke.js

License: MIT License

JavaScript 100.00%

bespoke-bullets's Introduction

Build Status Coverage Status

bespoke-bullets

Bullet Lists for Bespoke.js

Style and animate bullet lists and their transitions with some simple CSS rules.

Download

Download the production version or the development version, or use a package manager.

Usage

This plugin is shipped in a UMD format, meaning that it is available as a CommonJS/AMD module or browser global.

For example, when using CommonJS modules:

var bespoke = require('bespoke'),
  bullets = require('bespoke-bullets');

bespoke.from('article', [
  bullets('li, .bullet')
]);

When using browser globals:

bespoke.from('article', [
  bespoke.plugins.bullets('li, .bullet')
]);

As you may have noticed, you can provide a custom bullet selector. This allows you to easily configure which elements are treated as bullets.

CSS

The following classes are available on your bullet elements, which allow you to style and animate them.

bespoke-bullet Every bullet element
bespoke-bullet-active All active bullets
bespoke-bullet-inactive All inactive bullets
bespoke-bullet-current The current bullet

Data Atrributes

When no selector is provided, the default behaviour is to look for elements with data-bespoke-bullet attributes, for example:

bespoke.from('article', [
  bullets()
]);
<article>
  <section>
    <h1 data-bespoke-bullet>Slide Title</h1>
    <ul>
      <li data-bespoke-bullet>Bullet 1</li>
      <li data-bespoke-bullet>Bullet 2</li>
      <li data-bespoke-bullet>Bullet 3</li>
    </ul>
  </section>
</article>

Package managers

npm

$ npm install bespoke-bullets

Bower

$ bower install bespoke-bullets

Credits

This plugin was built with generator-bespokeplugin.

License

MIT License

bespoke-bullets's People

Contributors

andreypopp avatar markdalgleish avatar pimterry avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.