Skip to content

htmlandbacon/govuk-elements-nunjucks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

govuk-elements-nunjucks

🚨 Deprecation notice 🚨

The GOV.UK design system now has nunjucks macros - you can find out more on github.

You should look to move to this instead.

GOVUK elements, nunjucks style.

This includes a selection form macros from GOV.UK elements, these are using nunjucks and provide a component that can be configured, this encapsulates - text, data, error state, classes and values.

This is a mirror of govuk-elelemt-marko in nunjucks.

Old style radio and checkboxes can be found under retired these can be used with GOV.UK elements v2.1.2 or GOV.UK Frontend Toolkit pre 4.17.0.

Tests

Tests can be ran by running 'npm run test' this will run xo linter and the specs against each component.

Information

Components with defined schemas.

Current components:

  • gov-checkboxes
  • gov-date-input
  • gov-error-summary
  • gov-input
  • gov-radio
  • gov-select
  • gov-textarea

Things to add/improve

  • common approach to data-attributes

Examples

gov-input has the following inputs

name
id
label
hint
value
error
maxlength

This will need to be exposed in the nunjuck render and can be called like this:

{% from 'gov-input/macro.njk' import govInput %}

{{ govInput(name='input', label='This is a label') }}

Documentation

UI Graveyard

Contributing

Notice something wrong? Or a feature that is missing?

Feel free to open an issue, or fork and do a pull request.

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published