You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.7 KiB

  1. ---
  2. layout : 'default'
  3. css : ''
  4. element : 'sticky'
  5. elementType : 'module'
  6. title : 'Sticky'
  7. description : 'A sticky element sticks to the browsers viewport as page content is scrolled'
  8. type : 'UI Module'
  9. status : 'Undocumented'
  10. ---
  11. <%- @partial('header', { tabs: { overview: 'Overview' } }) %>
  12. <div class="main container">
  13. <div class="ui active tab" data-tab="overview">
  14. <h2 class="ui dividing header">Current Progress</h2>
  15. <div class="ui indicating progress">
  16. <div class="bar" style="width: 90%;">
  17. <div class="progress">90%</div>
  18. </div>
  19. <div class="label">Needs Documentation</div>
  20. </div>
  21. <h2 class="ui dividing header">Usage</h2>
  22. <div class="no example">
  23. <h4 class="ui header">Content on Rails</h4>
  24. <p>Sticky allows for content to stick itself to a different elements viewport, so that it remains on screen as long as its related content is visible</p>
  25. <p>Sticky content is a common pattern for content-based websites to allow for related links, author information, footnotes, and other extra information to be displayed while a user is engaged with a section of content. The grace of a sticky element, compared to a fixed element, is that sticky content is also designed to remove itself from view when a user is no longer engaged with that section, allowing for other content sections or a footer section to appear without distraction</p>
  26. </div>
  27. <div class="no example">
  28. <h4 class="ui header">What's Different?</h4>
  29. <p>Semantic's sticky component caches content positions on load then uses <a href="https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver" target="_blank">DOM Mutations Observers</a> to make sure that content positions adjust as an element adjusts itself.</p>
  30. </div>
  31. <div class="no example">
  32. <h4 class="ui header">Fixed Content Taller than the Browser</h4>
  33. <p>In addition, SUI's component gracefully handles many edge cases of sticky content, allowing for the sticky column itself to scroll separately from the main site scrollbar if it cannot fit inside a browser viewport, binding to the top or bottom edge of the viewport when fully visible</p>
  34. </div>
  35. <h2 class="ui dividing header">Development Progress</h2>
  36. <div class="no example">
  37. <p>This is an undocumented component, but is <b>mostly complete</b>.</p>
  38. <p>You can help support the future development of the Semantic UI project, and help boost the priority of this component by donating to Semantic UI development.</p>
  39. <p>Please be sure to leave a note in the comments to indicate that you are interested in the development of this particular component.</p>
  40. </div>
  41. </div>
  42. </div>