steps.mdx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ---
  2. title: Steps
  3. description: Steps are used to guide users through complex processes, making them easier and more intuitive. Breaking a multi-step process into smaller parts and tracking progress along the way helps users complete it successfully.
  4. new: true
  5. ---
  6. ## Default markup
  7. Steps show users where they are within a process, what steps they have already completed and what they are expected to complete. Making multi-step processes more user-friendly facilitates users' interaction with your interface.
  8. Use the `steps` class to create the default progress tracker and name the steps accordingly.
  9. ```html code example
  10. <div class="steps">
  11. <a href="#" class="step-item">
  12. Step 1
  13. </a>
  14. <a href="#" class="step-item">
  15. Step 2
  16. </a>
  17. <a href="#" class="step-item active">
  18. Step 3
  19. </a>
  20. <span href="#" class="step-item">
  21. Step 4
  22. </span>
  23. </div>
  24. ```
  25. ## Tooltips
  26. Add tooltips, if you want to provide users with additional information about the steps they are expected to complete. Tooltips are displayed when a user hovers over a given step and help clarify what might not be clear from the interface.
  27. ```html code example
  28. <div class="steps">
  29. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 1 description">
  30. Step 1
  31. </a>
  32. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 2 description">
  33. Step 2
  34. </a>
  35. <a href="#" class="step-item active" data-bs-toggle="tooltip" title="Step 3 description">
  36. Step 3
  37. </a>
  38. <span href="#" class="step-item" data-bs-toggle="tooltip" title="Step 4 description">
  39. Step 4
  40. </span>
  41. </div>
  42. ```
  43. ## Color
  44. You can customize the default progress indicator by changing the color to one that better suits your design. Click [here](colors) to see the range of available colors.
  45. ```html code example
  46. <div class="steps steps-green">
  47. <a href="#" class="step-item">
  48. Step 1
  49. </a>
  50. <a href="#" class="step-item">
  51. Step 2
  52. </a>
  53. <a href="#" class="step-item active">
  54. Step 3
  55. </a>
  56. <span href="#" class="step-item">
  57. Step 4
  58. </span>
  59. </div>
  60. <div class="steps steps-red">
  61. <a href="#" class="step-item">
  62. Step 1
  63. </a>
  64. <a href="#" class="step-item">
  65. Step 2
  66. </a>
  67. <a href="#" class="step-item active">
  68. Step 3
  69. </a>
  70. <span href="#" class="step-item">
  71. Step 4
  72. </span>
  73. </div>
  74. ```
  75. ## Steps without title
  76. For designs with limited space, use progress indicators without titles and add tooltips to provide the necessary details.
  77. ```html code example
  78. <div class="steps">
  79. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 1 description"></a>
  80. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 2 description"></a>
  81. <a href="#" class="step-item active" data-bs-toggle="tooltip" title="Step 3 description"></a>
  82. <span href="#" class="step-item" data-bs-toggle="tooltip" title="Step 4 description"></span>
  83. </div>
  84. ```
  85. ## Steps with numbers
  86. Use the `steps-counter` class to create a progress tracker with numbers instead of titles and change the color to customize it.
  87. ```html code example
  88. <div class="steps steps-counter steps-lime">
  89. <a href="#" class="step-item"></a>
  90. <a href="#" class="step-item active"></a>
  91. <span href="#" class="step-item"></span>
  92. <span href="#" class="step-item"></span>
  93. <span href="#" class="step-item"></span>
  94. </div>
  95. ```