![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
miller-columns-element
Advanced tools
Miller columns (cascading lists) for hierarchical topic selection on GOV.UK taxonomy
Express a hierarchy by showing selectable lists of the items in each hierarchy level.
Selection of any item shows that item’s children in the next list.
npm install --save miller-columns-element
This element is expected to be used in an application with govuk-frontend installed. The expected CSS dependencies are outlined in examples.scss.
<p id="navigation-instructions" class="govuk-body govuk-visually-hidden">
Use the right arrow to explore sub-topics, use the up and down arrows to find other topics.
</p>
<miller-columns-selected id="selected-items" for="miller-columns" class="miller-columns-selected"></miller-columns-selected>
<miller-columns class="miller-columns" for="taxonomy" selected="selected-items" id="miller-columns" aria-describedby="navigation-instructions">
<ul id="taxonomy">
<li>
<input class="govuk-checkboxes__input" type="checkbox" id="parenting-childcare-and-children-s-services">
<label class="govuk-label govuk-checkboxes__label" for="parenting-childcare-and-children-s-services">
Parenting, childcare and children's services
</label>
<ul>
<li>
<input class="govuk-checkboxes__input" type="checkbox" id="divorce-separation-and-legal-issues">
<label class="govuk-label govuk-checkboxes__label" for="divorce-separation-and-legal-issues">
Divorce, separation and legal issues
</label>
</li>
<li>
<input class="govuk-checkboxes__input" type="checkbox" id="childcare-and-early-years">
<label class="govuk-label govuk-checkboxes__label" for="childcare-and-early-years">
Childcare and early years
</label>
</li>
</ul>
</li>
</ul>
</miller-columns>
Browsers without native custom element support require a polyfill.
npm install
npm test
To continuously build files while developing run:
npm run watch
To install and run a local HTTP server using Node.js:
npm install -g http-server
http-server
To manually check examples in a web browser or using BrowserStack:
http://127.0.0.1:8080/examples/index.html
(default example)http://127.0.0.1:8080/examples/checkboxes-checked.html
(with pre-selected items at page load)http://127.0.0.1:8080/examples/miller-columns-test.html
(example used for tests)Alternatively, you can open one of the HTML files in the /examples
directory for a quick preview.
Distributed under the MIT license. See LICENSE for details.
2.0.0
govuk-frontend
(PR #97)FAQs
Miller columns (cascading lists) for hierarchical topic selection on GOV.UK taxonomy
The npm package miller-columns-element receives a total of 117 weekly downloads. As such, miller-columns-element popularity was classified as not popular.
We found that miller-columns-element demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.