UNPKG

@financial-times/o-toggle

Version:

Utility that provides toggle (show/hide) behaviour to a <button> or <a> tag and a target.

54 lines (53 loc) 1.48 kB
{ "brands": [ "core", "internal", "whitelabel" ], "origamiType": "component", "origamiVersion": "2.0", "support": "https://github.com/Financial-Times/origami/issues/new?labels=o-toggle,components", "supportContact": { "email": "origami.support@ft.com", "slack": "financialtimes/origami-support" }, "browserFeatures": { "required": [ "CustomEvent", "Element.prototype.classList", "NodeList.prototype.@@iterator" ] }, "supportStatus": "active", "demosDefaults": { "js": "demos/src/demo.js", "sass": "demos/src/demo.scss" }, "demos": [ { "title": "Toggle display on/off.", "name": "display-toggle", "template": "demos/src/demo.mustache", "data": { "type": "display" }, "description": "This toggle target has a class \"o-toggle-display\" which hides it until clicking the toggle updates its aria attributes and adds the \"o-toggle--active\" class." }, { "title": "Toggle visibility.", "name": "visibility-toggle", "template": "demos/src/demo.mustache", "data": { "type": "visibility" }, "description": "This toggle target has a class \"o-toggle-visibility\" which visually hides it, whilst still occupying space, until clicking the toggle updates its aria attributes and adds the \"o-toggle--active\" class." }, { "hidden": true, "title": "Anchor toggle", "name": "anchor", "template": "demos/src/anchor.mustache", "description": "Demonstrate toggle use on anchors" } ] }