@servicensw/navigation

3.1.7 • Public • Published

@servicensw/navigation

Service NSW package documentation and examples
(Login credentials required)

Installation

npm install @servicensw/navigation --save-dev

How to use

CSS

  • PostCSS workflow: @import '@servicensw/navigation';
  • Sass/Eyeglass: @import 'servicensw-navigation';
  • Native CSS: @import url('dist/navigation.css');
  • Link tag: <link href="dist/navigation.css" rel="stylesheet" type="text/css">

Vanilla JS

The recommended usage is of ES modules, to take advantage of code-splitting.

import {
  StickyNav,
  SecondaryNav,
  TableOfContents,
} from "@servicensw/navigation"

new StickyNav("#stickyNav:not(.is-excluded)", "#stickyNavContainer")
new SecondaryNav("#secondaryNav:not(.is-excluded)")
new TableOfContents("#toc:not(.is-excluded)", "#tocContainer")

Legacy usage;

  • IIFE: <script src="dist/navigation.js" type="text/javascript"></script> (initialized for all above elements)
  • Common JS: const { StickyNav, SecondaryNav, TableOfContents } = require("@servicensw/regions") (initialize yourself) Change log

Readme

Keywords

none

Package Sidebar

Install

npm i @servicensw/navigation

Weekly Downloads

78

Version

3.1.7

License

MIT

Unpacked Size

95.9 kB

Total Files

28

Last publish

Collaborators

  • larowlan
  • rikki_iki
  • acbramley
  • erinsnsw
  • dojob65
  • ramya.shankaralingam
  • mariam.khoudier
  • christine.roque
  • previousnext-admin
  • mcaddz
  • jptaranto