{"_id":"fluid-tabs","_rev":"8-f704f804d2c7d05d1562ac9a61240b91","name":"fluid-tabs","dist-tags":{"latest":"1.0.3"},"versions":{"0.1.0":{"name":"fluid-tabs","version":"0.1.0","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MIT","_id":"fluid-tabs@0.1.0","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://github.com/ewanhowell5195/fluid-tabs#readme","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"9bd1cccbcc324f9505f61a6482159ef91bb3d6ef","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-0.1.0.tgz","fileCount":5,"integrity":"sha512-bOraTK3iBPEPQ9CP3O+AyEK/JfYiOhY7kVQj8vrZIcAutejJ9R9F0Esw3cseSqceBKpuDNIPGgJNKQaubwqCcQ==","signatures":[{"sig":"MEYCIQCBs9nzLkp7AuXGYVmZRS89rYz0qRvs0mBVqN4HznNaowIhAJBpWMJXiHWPQlBvmFDEXJHXLO53GV5XVnR3cavno5IH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20649},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"19534b9bb6bd16df79ef2ddd188469556623d51f","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.7","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_0.1.0_1781911401258_0.3297088554817367","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"fluid-tabs","version":"0.1.1","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MIT","_id":"fluid-tabs@0.1.1","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://github.com/ewanhowell5195/fluid-tabs#readme","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"fb39bddaf81ef21fcffe0a1db8c8b37e84d9da1d","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-0.1.1.tgz","fileCount":5,"integrity":"sha512-6Sh3aifLk9VnqfdXQkB2ClkSldbLeX2wGTrh4NoL5SvpgNCmRJ+6Z1z4QmJf/jNBoSzFO58PF46bIAlp4zTU3w==","signatures":[{"sig":"MEUCIQCjfIFbiJ6EOH1ZnpQ2qmARlaeOSqQkY4GpcvfzbgShoQIgf/oziMGbG7dRWVNshCazRyrsrJeOw5MlHeo4PPemAKU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21107},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"a294b5cd494515dfd1408e34d45bdaa02e854eb4","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.7","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_0.1.1_1781912920849_0.7471442068814367","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"fluid-tabs","version":"0.1.2","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MIT","_id":"fluid-tabs@0.1.2","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://github.com/ewanhowell5195/fluid-tabs#readme","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"5753443e8a2425e68d33f8a515d62d61358c9899","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-0.1.2.tgz","fileCount":5,"integrity":"sha512-tKzG91B3xKHdrivURG0/RkBJmvEnSQk2p7Xr4gstHdF/Yric/ElMm0omGfRm7zW/m0ySy49WI/C59NVJLqVrvw==","signatures":[{"sig":"MEQCIFsyO1ori2pXsCHekDysDtoCIMpwNYiP/MSAq3vNWepJAiB7fL8UnnGfZTdBFCtsbXxd9NKQVcVdN4eCcWcuJlw8tw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21196},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"f1afe6b1e806b5a7b1b0d5533b569bd7d1c2b834","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.7","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_0.1.2_1781995369670_0.27954784890161544","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"fluid-tabs","version":"0.1.3","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MIT","_id":"fluid-tabs@0.1.3","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://github.com/ewanhowell5195/fluid-tabs#readme","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"7acb502effcfa151aebb5b324dc82fe380c9e4ba","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-0.1.3.tgz","fileCount":5,"integrity":"sha512-9HA638XGpKLMNcasZJpULnHt8FnkyFQmDyott7N2H8agi2YVP8JeiHqJ1kSW+PEBoVb12by8MoVHAR70wAu8Bw==","signatures":[{"sig":"MEUCIB02BNb0A+yLn9Zf8OngwRUn6lUIR86SgHuETafAFAVkAiEA2YtnGpzBWfQnucV4PAILF6oCr0r2FoPdMOb27x/LWCY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21357},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"795e49a156892168ec68113373f353e5f468d478","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.7","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_0.1.3_1787575017523_0.24642906128829867","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"fluid-tabs","version":"1.0.0","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MPL-2.0","_id":"fluid-tabs@1.0.0","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://github.com/ewanhowell5195/fluid-tabs#readme","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"ce8acf3ca3b566144b16999c9d641089fb75c22b","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-1.0.0.tgz","fileCount":5,"integrity":"sha512-IUNY7dr4n0pIQKbA4T7b7ZmcuRgPjNRBCbcq2znO98JbjkgmKXpRYoSzxpnZxSdvd+8jHugqtBRfzuih7q38qQ==","signatures":[{"sig":"MEUCIQD7fVtegp5vnuzoEaZHAGlK3G6y7cBFoEoXbVdeEDb32gIgTY2QiL9aHhlE5FWSH0kF/D6MjfQKhhhGOosb0mHKfCU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQD8MdvP8JWTwcjfxM2EgCLOnxaf4zabYVS5AFX7MgGc6AIgdsturGFgppXhTg/HhEOrViLiiLa70vP38KVg4k9zSzs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54226},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"c5d12fb8390d16c426a5a5f245268c9ee53eb58a","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.9","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.23.4","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_1.0.0_1793896991202_0.3833229368281982","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"fluid-tabs","version":"1.0.1","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MPL-2.0","_id":"fluid-tabs@1.0.1","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://github.com/ewanhowell5195/fluid-tabs#readme","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"a5c2e02d3e30ab1093449474130d25021a752167","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-1.0.1.tgz","fileCount":5,"integrity":"sha512-uKc4sPqUkmN/XN49yPf6xJExkdvehmAqG6x5n9B0iQa+o5Xi72WafLMOchclbp/UOko/J5eQx/XkzCp39XYbIw==","signatures":[{"sig":"MEQCIC9PEqVrdLBNAdFFx87CmiGOpvgPA8URvcvq5W4k5qvUAiAUr1BBs5NUTTiy5XBBF9TyaqXK894z44yhuUj0lMY67g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCr8w0A1Kg4vVBJYwdH6ItWbeLALsXIiIhKZbE08YCWhwIgQet+121I7DKeKLODkzL9nk2R/0qTsG+iKJb0FCWSFQ8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54449},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"4b7d90aaab4696bdd290228c12909a1444c1df09","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.9","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.23.4","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_1.0.1_1793898420193_0.2755409852822732","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"fluid-tabs","version":"1.0.2","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MPL-2.0","_id":"fluid-tabs@1.0.2","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"homepage":"https://fluid-tabs.ewanhowell.com/","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"061eb56d58b29e7dd392f416b9043c1bbaee38d3","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-1.0.2.tgz","fileCount":5,"integrity":"sha512-Ks7fpgyN8Igb44FYsdcy2aZMquIaxgmQ7Pmj8wpYy7Jupu4mauNp4r0R+xMKdQ1vFRXpOVh0UpmY//s1fooXRw==","signatures":[{"sig":"MEUCIFy2jfw0wz+5S95HP496RclQi36qnQfd24pY/rFrvbXVAiEAwKMnHziC4Ji/uPJB6/zvg8vHmTVzcwloRDn7y4zQssw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIE9m+DSj/kxZ5uQsSacxLglM2loixRr/nJnLDnYTSkOiAiEAnxBdyYiFLU5KGCHRAHBHPe9qTpFtgPF7PFzPUzopXJ0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54485},"main":"./dist/fluid-tabs.min.js","type":"module","style":"./dist/fluid-tabs.min.css","exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"480a2fe51c028535bbe5426587ff03f606936dd8","scripts":{"build":"node build.js"},"_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.9","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"_nodeVersion":"22.23.4","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/fluid-tabs_1.0.2_1793923625176_0.7008971711854742","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"_id":"fluid-tabs@1.0.3","bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"dist":{"shasum":"237ef53a27c5e60049e96c7259095ce107fb5a35","tarball":"https://registry.npmjs.org/fluid-tabs/-/fluid-tabs-1.0.3.tgz","fileCount":5,"integrity":"sha512-WTl9DooUDaNVsQpH3aS6HmvuoI00wDBAaqV+/WQRNH9x9qikgIrszu4U1FKQlOOmn7n8KQLTnuroYeWQvumFyw==","signatures":[{"sig":"MEYCIQC7AdtuNWaPEEzqW5tb7pcKg3k1aNnfeND6QflmsuXNmQIhANBsGsUdgI+8TUie3u6+Kanbfi8BOMa+e9PbM676tNhV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDghCI7uUgJX86CBVUuP2vygFoilAAXiuIzuYBDPXxT0AiBEB4WIqZxAnZZzftqn0oAwGS6KbO485Xd2H1/HCDoK7Q=="}],"unpackedSize":54501},"main":"./dist/fluid-tabs.min.js","name":"fluid-tabs","type":"module","style":"./dist/fluid-tabs.min.css","author":{"name":"Ewan Howell","email":"ewanhowell5195"},"exports":{".":"./dist/fluid-tabs.min.js","./styles.css":"./dist/fluid-tabs.min.css"},"gitHead":"3b94035c153aba15b9bddaf1c37f91a4f2a95f15","license":"MPL-2.0","scripts":{"build":"node build.js"},"version":"1.0.3","_npmUser":{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"},"homepage":"https://fluid-tabs.ewanhowell.com/","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"_npmVersion":"10.9.9","description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","directories":{},"maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"_nodeVersion":"22.23.4","_hasShrinkwrap":false,"devDependencies":{"terser":"^5.43.1","clean-css":"^5.3.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fluid-tabs_1.0.3_1794564911284_0.3719674883751487"}}},"time":{"created":"2026-06-19T23:23:21.216Z","modified":"2026-11-13T10:15:11.532Z","0.1.0":"2026-06-19T23:23:21.392Z","0.1.1":"2026-06-19T23:48:40.991Z","0.1.2":"2026-06-20T22:42:49.792Z","0.1.3":"2026-08-24T12:36:57.985Z","1.0.0":"2026-11-05T16:43:11.307Z","1.0.1":"2026-11-05T17:07:00.305Z","1.0.2":"2026-11-06T00:07:05.280Z","1.0.3":"2026-11-13T10:15:11.377Z"},"bugs":{"url":"https://github.com/ewanhowell5195/fluid-tabs/issues"},"author":{"name":"Ewan Howell","email":"ewanhowell5195"},"license":"MPL-2.0","homepage":"https://fluid-tabs.ewanhowell.com/","keywords":["fluid-tabs","tabs","tab-bar","tabbed-interface","javascript","zero-dependency"],"repository":{"url":"git+https://github.com/ewanhowell5195/fluid-tabs.git","type":"git"},"description":"A lightweight, zero-dependency tabs library with smooth animated indicators, swipe support, and multiple visual styles.","maintainers":[{"name":"ewanhowell5195","email":"ewan@ewanhowell.com"}],"readme":"# fluid-tabs\n\nA lightweight, zero-dependency tabs library with a smooth animated indicator, drag/wheel/swipe scrolling, and multiple visual styles.\n\n[![npm version](https://badge.fury.io/js/fluid-tabs.svg)](https://www.npmjs.com/package/fluid-tabs)\n[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/fluid-tabs/badge)](https://www.jsdelivr.com/package/npm/fluid-tabs)\n[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\n\n[**Live Demo**](https://fluid-tabs.ewanhowell.com/)\n\n## Features\n\n* No dependencies\n* Six visual styles out of the box: underline, classic tabs, slide, pill, nav, and card\n* Horizontal or vertical, switchable by screen size\n* Animated indicator that slides between tabs with an elastic stretch, and a spring \"tease\" on hover\n* Animated content panel that cross-fades and resizes between tabs\n* Too many tabs? They scroll horizontally (drag, wheel, or swipe) with momentum and edge fades. Opt into wrapping instead.\n* Swipe left/right on the content to change tabs on touch\n* Interruptible: click another tab mid-animation and the indicator redirects, no waiting\n* Detached tabs: the bar and its panels don't have to be siblings\n* Fires a `tab-changed` event, and works with plain `.click()`\n* Themeable with a handful of CSS variables\n\n## Quick Start\n\n### Install via npm\n```bash\nnpm install fluid-tabs\n```\n\n```js\nimport \"fluid-tabs/styles.css\"\nimport \"fluid-tabs\"\n```\n\n### Or use via CDN\nhttps://www.jsdelivr.com/package/npm/fluid-tabs\n\n### Add tabs to your HTML\n\n```html\n<div class=\"tab-bar\">\n  <button class=\"tab-bar-button active\" data-tab=\"overview\">Overview</button>\n  <button class=\"tab-bar-button\" data-tab=\"details\">Details</button>\n  <button class=\"tab-bar-button\" data-tab=\"reviews\">Reviews</button>\n</div>\n<div class=\"tab-contents\">\n  <div class=\"tab-content active\" data-tab=\"overview\">Overview content</div>\n  <div class=\"tab-content\" data-tab=\"details\">Details content</div>\n  <div class=\"tab-content\" data-tab=\"reviews\">Reviews content</div>\n</div>\n```\n\nEvery `.tab-bar` on the page is initialised automatically on load - no setup or config required.\n\n* A `.tab-bar` holds the `.tab-bar-button`s.\n* The matching `.tab-contents` holds the `.tab-content` panels.\n* Buttons and panels are paired by `data-tab` - clicking a button shows the panel with the same value.\n* Mark the starting button and panel with `active`.\n\nThe content panel is optional. A `.tab-bar` on its own still animates the indicator and fires `tab-changed` - useful as a filter/segmented control.\n\n## Styles\n\nSet a `tab-style-*` class on both the `.tab-bar` and its matching `.tab-contents`. If you forget it on the panel, the library copies the bar's style onto it as a fallback.\n\n| Class | Style |\n|---|---|\n| *(none)* / `tab-style-underline` | **Underline** - text tabs with a sliding underline. The default. |\n| `tab-style-tabs` | **Classic tabs** - filled tabs joined to a bordered content panel. |\n| `tab-style-slide` | **Slide** - a pill-shaped segmented control with a sliding knob. |\n| `tab-style-pill` | **Pill** - separate rounded tabs with a filled pill sliding between them. |\n| `tab-style-nav` | **Nav** - equal width tabs with an icon above the label, like an app bar. Put an `<svg>` before the label. |\n| `tab-style-card` | **Card** - large tabs with a title and description. Put the description in a `<span>` after the title. |\n\n```html\n<div class=\"tab-bar tab-style-slide\"> … </div>\n<div class=\"tab-contents tab-style-slide\"> … </div>\n```\n\n## Linking the content\n\nThere are three ways a bar finds its panels.\n\n### Adjacent (default)\n\nPut the `.tab-contents` immediately after the `.tab-bar`:\n\n```html\n<div class=\"tab-bar\"> … </div>\n<div class=\"tab-contents\"> … </div>\n```\n\n### Detached\n\nIf the bar and panels can't be siblings, give the bar an `id` and point the contents at it with `data-tab-bar`:\n\n```html\n<div class=\"tab-bar\" id=\"account\"> … </div>\n\n<p>…anything in between…</p>\n\n<div class=\"tab-contents\" data-tab-bar=\"account\"> … </div>\n```\n\n### Standalone\n\nA `.tab-bar` with no matching `.tab-contents` just tracks the active button and fires `tab-changed`.\n\n## Options\n\nBehavioural options are set as data attributes on the `.tab-bar`.\n\n| Attribute | Description |\n|---|---|\n| `data-tab-wrap` | Wrap to multiple rows instead of scrolling when the tabs don't fit. |\n| `data-tab-vertical` | Run the bar down the side of its panels. Use a media query as the value to only do this when it matches. |\n| `data-tab-no-swipe` | Disable swipe-to-change on the content panel. |\n\n```html\n<div class=\"tab-bar\" data-tab-wrap> … </div>\n```\n\n## Scrolling &amp; wrapping\n\nWhen there are more tabs than fit, the bar **scrolls** horizontally by default. You can:\n\n* **Drag** it with the mouse or finger (with flick momentum)\n* **Wheel** over it\n* **Swipe** the content panel to step between tabs\n\nA soft fade appears on whichever edge has hidden tabs, and selecting a tab scrolls it into view. Wheel scrolling only kicks in when a gesture *starts* over the bar, so scrolling the page past it isn't hijacked.\n\nAdd `data-tab-wrap` to wrap onto multiple rows instead of scrolling.\n\n## Vertical tabs\n\nAdd `data-tab-vertical` and put the bar and its panels in a flex container:\n\n```html\n<div style=\"display: flex; flex-wrap: wrap\">\n  <div class=\"tab-bar\" data-tab-vertical=\"(min-width: 700px)\"> … </div>\n  <div class=\"tab-contents\"> … </div>\n</div>\n```\n\nWith a media query as the value, the bar is horizontal whenever it doesn't match, and `flex-wrap` stacks the panels underneath it. Give the bar a `max-height` to make it scroll vertically. Up and down arrow keys replace left and right.\n\n## Right-to-left\n\nIn a `dir=\"rtl\"` layout everything mirrors automatically, including scrolling, edge fades, swipes, arrow keys, and the panel slide.\n\n## Events\n\nThe bar dispatches a `tab-changed` event when the active tab changes. `event.detail` is the new tab's `data-tab`:\n\n```js\ndocument.querySelector(\".tab-bar\").addEventListener(\"tab-changed\", e => {\n  console.log(\"switched to\", e.detail)\n})\n```\n\n## Programmatic control\n\nSwitch tabs by clicking a button - the library listens for normal clicks:\n\n```js\nconst bar = document.querySelector(\".tab-bar\")\nbar.querySelector('.tab-bar-button[data-tab=\"reviews\"]').click()\n```\n\nEach initialised bar also exposes an `update()` method that re-snaps the indicator and edge fades. It's called automatically on resize; call it yourself if you change the layout in a way a `ResizeObserver` won't catch:\n\n```js\nbar.update()\n```\n\n`destroy()` removes the indicator, listeners, observers and classes the library added. The current `active` tab and panel are kept, and `FluidTabs.init()` can initialise the bar again:\n\n```js\nbar.destroy()\n```\n\n### Initialising dynamically-added tabs\n\nEvery `.tab-bar` present on load is initialised automatically. If you add tab bars later, call `FluidTabs.init()` to pick up any that aren't initialised yet. It's idempotent - already-initialised bars are skipped. Pass a root element to limit the scan:\n\n```js\nFluidTabs.init()           // scan the whole document\nFluidTabs.init(sectionEl)  // scan within an element\n```\n\n## Theming\n\nThe library ships the structural and default styling it needs. Tweak the look with these CSS variables (shown with their defaults):\n\n| Variable | Default | Description |\n|---|---|---|\n| `--tab-transition-duration` | `.25s` | Duration of every transition (indicator, panel, height). |\n| `--tab-transition-easing` | `cubic-bezier(.4, 0, .2, 1)` | Easing for every transition. |\n| `--tab-slide-lag` | `.333` | Trailing-edge lag of the indicator slide, as a fraction of the duration. `0` removes the elastic stretch. |\n| `--tab-tease-x` | `10px` | How far the indicator stretches toward a hovered tab. |\n| `--tab-fade` | `60px` | Width of the scroll edge fade. |\n| `--tab-panel-distance` | `64px` | How far panels slide. `0` leaves just the fade. Set it on `.tab-contents` or an ancestor, not `.tab-bar`. |\n| `--tab-panel-blend` | `normal` | Blend mode of panels while they cross-fade. Set it on the `.tab-contents` itself. |\n\n```css\n.tab-bar {\n  --tab-transition-duration: .2s;\n  --tab-fade: 40px;\n}\n```\n\nColours, radii, and spacing are plain values in the stylesheet - override the `.tab-bar`, `.tab-bar-button`, `.tab-contents`, and `.tab-content` rules to restyle.\n\n### Panel transitions\n\nEach `.tab-content` gets `--tab-panel-x`, which is `-1` before the active tab, `0` when active, and `1` after it. Use it to move something inside a panel separately. Here the panel's background fades while its content slides:\n\n```css\n.my-panels > .tab-content {\n  transform: none;\n}\n\n.my-panels .content {\n  transform: translateX(calc(var(--tab-panel-x) * 64px));\n  transition: transform var(--tab-transition-duration) var(--tab-transition-easing);\n}\n```\n\nTo keep the same background on every tab, set the CSS `background` on `.tab-contents` instead of on each `.tab-content`. Any other animation can key off `.tab-content.active`, and the panel change waits for it unless it repeats forever.\n\nPanels with their own backgrounds let the page show through as they cross-fade. Set `--tab-panel-blend: plus-lighter` to stop that. It needs a `.tab-contents` with no background of its own.\n\n### Custom indicators\n\nEach `.tab-bar-button` gets `--tab-button-x`, which is `-1` before the active tab, `0` when active, and `1` after it. To replace the sliding indicator, hide it and draw your own on each button. Here the old one blurs away towards the new tab, and the new one blurs in from the same direction:\n\n```css\n.my-bar > .tab-bar-active {\n  display: none;\n}\n\n.my-bar > .tab-bar-button::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background: #fff;\n  opacity: 0;\n  filter: blur(8px);\n  transform: translateX(calc(var(--tab-button-x) * -16px));\n  transition: opacity .5s, filter .5s, transform .5s;\n}\n\n.my-bar > .tab-bar-button.active::before {\n  opacity: 1;\n  filter: none;\n}\n```\n\n### Active label reveal\n\nEach button has a hidden copy of its label in `.tab-bar-button-reveal`, clipped to the indicator's shape. Show it to change the label's colour exactly at the indicator's edge. The slide, pill and card styles use it. To use it in your own style:\n\n```css\n.my-bar > .tab-bar-button.active {\n  color: #fff;\n}\n\n.my-bar > .tab-bar-button > .tab-bar-button-reveal {\n  visibility: visible;\n  color: #fff;\n}\n```\n\nHide it again with `visibility: hidden` for a custom indicator that hides `.tab-bar-active`.\n\nThe `textContent` of the bar or anything around it includes the copies, as does a button's `innerText` while its copy is visible. A rule using `.tab-bar-button > svg` doesn't reach inside the copy. Use `.tab-bar-button svg`.\n\n### Classes\n\nThese are added by the library and can be targeted with CSS:\n\n| Class | When applied |\n|---|---|\n| `initialised` | On each `.tab-bar` once set up. |\n| `active` | On the current `.tab-bar-button` and its `.tab-content`. |\n| `tab-bar-active` | The indicator element, appended inside each `.tab-bar`. |\n| `tab-bar-button-reveal` | The hidden copy of the label, inside each `.tab-bar-button`. |\n| `tab-bar-wrap` | When `data-tab-wrap` is set. |\n| `tab-bar-vertical` / `tab-contents-vertical` | On the bar and its panels while vertical. |\n| `tab-bar-dragging` | While the bar is being drag-scrolled. |\n| `tab-bar-fade-start` / `tab-bar-fade-end` | When there are hidden tabs off the start / end edge. |\n| `transitioning` | On `.tab-contents` while a panel change is animating. |\n\n## License\n\n[MPL-2.0](LICENSE) © [Ewan Howell](https://ewanhowell.com/)\n","readmeFilename":"README.md"}