New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

govuk-webcomponents

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

govuk-webcomponents

A set of encapsulated Web components consuming the GOV.UK Design System

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-63.64%
Maintainers
1
Weekly downloads
 
Created
Source

govuk-webcomponents

A set of encapsulated Web Components consuming the GOV.UK Design System.

npm

Please note this package is not affiliated to GOV.UK but consumes code as distributed in the govuk-frontend npm package (v3.8.0).

Installation

npm install --save govuk-webcomponents

Components

Please visit the Storybook site for demos and code examples.

Usage

The web components are distributed as ES modules and can be used with any platform.

Modern browsers (Bare module specifiers)

To quickly try the components import the modules directly in the browser and serve with a process that supports bare module specifier resolution such as es-dev-server.

<body>
  <govukwc-button label="Save and continue"></govukwc-button>
  <script type="module">
    import 'govuk-webcomponents/components/govukwc-button/govukwc-button';
  </script>
</body>

Browsers to IE11 (Compiling to ES5)

To support browsers (down to IE11) a combination of polyfills and build steps will need to be taken.

At a highlevel outline the following is required:

  • Transpiling to ES5 will be required using build tools such as Webpack or Rollup.
  • The webcomponents.js pollyfills will need to be loaded.

Keywords

FAQs

Package last updated on 06 Aug 2020

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