divider.mdx 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ---
  2. title: Divider
  3. summary: Dividers help organize content and make the interface layout clear and uncluttered. Greater clarity adds up to better user experience and enhanced interaction with a website or app.
  4. description: Separate content with clear dividers.
  5. ---
  6. ## Default markup
  7. Use dividers to visually separate content into parts. You can use a line only or add text that will be centered by default.
  8. ```html example
  9. <p>
  10. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, dolore dolores doloribus est ex.
  11. </p>
  12. <div class="hr-text">See also</div>
  13. <p>
  14. Dicta error hic illo iure necessitatibus nihil officiis omnis perferendis, praesentium repellendus
  15. rerum, saepe sed, sit!
  16. </p>
  17. ```
  18. ## Text position
  19. You can modify the position of the text which is to be included in a separator and make it left- or right-aligned. Otherwise, the text will remain centered.
  20. ```html example height="380px"
  21. <p>
  22. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, dolore dolores doloribus est ex.
  23. </p>
  24. <div class="hr-text hr-text-start">Start divider</div>
  25. <p>
  26. Dicta error hic illo iure necessitatibus nihil officiis omnis perferendis, praesentium repellendus
  27. rerum, saepe sed, sit!
  28. </p>
  29. <div class="hr-text">Centered divider</div>
  30. <p>
  31. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, dolore dolores doloribus est ex.
  32. </p>
  33. <div class="hr-text hr-text-end">End divider</div>
  34. <p>
  35. Dicta error hic illo iure necessitatibus nihil officiis omnis perferendis, praesentium repellendus
  36. rerum, saepe sed, sit!
  37. </p>
  38. ```
  39. ## Divider color
  40. Customize the color of dividers to make them go well with your design. Click [here](/docs/ui/base/colors) to see the list of available colors.
  41. ```html example height="380px"
  42. <p>
  43. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, dolore dolores doloribus est ex.
  44. </p>
  45. <div class="hr-text text-green">Green divider</div>
  46. <p>
  47. Dicta error hic illo iure necessitatibus nihil officiis omnis perferendis, praesentium repellendus
  48. rerum, saepe sed, sit!
  49. </p>
  50. <div class="hr-text text-red">Red divider</div>
  51. <p>
  52. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, dolore dolores doloribus est ex.
  53. </p>
  54. <div class="hr-text text-primary">Primary divider</div>
  55. <p>
  56. Dicta error hic illo iure necessitatibus nihil officiis omnis perferendis, praesentium repellendus
  57. rerum, saepe sed, sit!
  58. </p>
  59. ```