Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

storm-guide

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storm-guide

GDS-style guide pattern implementation

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Storm Guide

npm version

GDS-style guide pattern implementation

Example

https://stormid.github.io/storm-guide

Usage

HTML

<div class="guide js-guide">
    <ol class="guide__navigation">
        <li class="guide__item"><a href="#section-1" class="js-guide__link guide__link">Section 1</a></li>
        <li class="guide__item"><a href="#section-2" class="js-guide__link guide__link">Section 2</a></li>
        <li class="guide__item"><a href="#section-3" class="js-guide__link guide__link">Section 3</a></li>
    </ol>
    <section id="section-1" class="tab js-guide__section guide__section">
        One
    </section>
    <section id="section-2" class="tab js-guide__section guide__section">
        Two
    </section>
    <section id="section-3" class="tab js-guide__section guide__section">
        Three
    </section>
    <div class="js-guide__incremental guide__incremental">
</div>

JS

npm i -S storm-guide

either using es6 import

import Guide from 'storm-guide';

Guide.init();

aynchronous browser loading (use the .standalone version in the /dist folder)

import Load from 'storm-load';

Load('/content/js/async/storm-guide.standalone.js')
    .then(() => {
        StormGuide.init();
    });

Options

    {
		linkClassName: '.js-guide__link',
		sectionClassName: '.js-guide__section',
		incrementalNavHolder: '.js-guide__incremental',
		activeClassName: 'active'
    }

e.g.

Guide.init({
    activeClassName: 'current'
});

Tests

npm run test

Browser support

This is module has both es6 and es5 distributions. The es6 version should be used in a workflow that transpiles.

This module depends upon Object.assign available in all evergreen browsers. ie9+ is supported with polyfills, ie8+ will work with even more polyfills for Array functions and eventListeners.

Dependencies

None

License

MIT

Keywords

FAQs

Package last updated on 29 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc