node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

@gov.au/skip-link

@gov.au/skip-link

Provide skip links to navigation and content.

Contents


Install

yarn add @gov.au/skip-link
npm install @gov.au/skip-link --save-dev

⬆ back to top


Usage

⬆ back to top


React

Usage:

import Button from './skip-link.js';
 
<SkipLink links={[
    {
        url: '#nav',
        text: 'Skip to navigation',
    },
    {
        url: '#content',
        text: 'Skip to content',
    },
]} />

All props:

<SkipLink
    links={[                         {/* All links inside a neat array */}
        {
            url: '#nav',                 {/* The href link of this link */}
            text: 'Skip to navigation',  {/* The text of the link */}
            onClick={ () => {} }         {/* A function to execute when the link is clicked, optional */}
        },
    ]}
/>

For more details have a look at the usage example.

⬆ back to top


Dependency graph

skip-link
└─ core

⬆ back to top


Build

⬆ back to top


Tests

The visual test: http://uikit.apps.staging.digital.gov.au/packages/skip-link/tests/site/

⬆ back to top


Release History

  • v0.3.0 - Added pancake-react plugin, ES5 main file
  • v0.2.0 - Added react component
  • v0.1.0 - 💥 Initial version

⬆ back to top


License

Copyright (c) Commonwealth of Australia. Licensed under MIT.

⬆ back to top

};