Replies: 6 comments 9 replies
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
|
UR findings on table of contents
|
Beta Was this translation helpful? Give feedback.
-
|
The sticky table of contents (In-page table of contents variant) test really well in UR sessions but on the website we have no control over the content that is used on it (i.e it could make the height greater that the viewport height which makes degrades the UX of the component). I want to propose a version that is non sticky by default but uses javascript to insert the class that makes the table sticky. This way it scrolls with the page (non-sticky) if its greater than viewport height (or even if users has JS off) and if not it uses the sticky version. So if you remove the class ons-grid__col--sticky@m in the HTML and have JS like this for example: document.addEventListener("DOMContentLoaded", function () { } // Run on page load // Run on window resize |
Beta Was this translation helpful? Give feedback.
-
Table of Contents Styling IssueThe issue surfaces when you only have one item in the Thanks! |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use this place to discuss the table of contents component in the ONS Design System
Beta Was this translation helpful? Give feedback.
All reactions