Socket
Socket
Sign inDemoInstall

@servicensw/navigation

Package Overview
Dependencies
6
Maintainers
11
Versions
173
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @servicensw/navigation

Navigation components


Version published
Weekly downloads
96
decreased by-32.87%
Maintainers
11
Created
Weekly downloads
 

Readme

Source

@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

FAQs

Last updated on 22 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc