steps.mdx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. ---
  2. title: Steps
  3. summary: 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. description: Simplify complex processes with steps.
  6. ---
  7. ## Default markup
  8. 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.
  9. Use the `steps` class to create the default progress tracker and name the steps accordingly.
  10. ```html example
  11. <div class="steps">
  12. <a href="#" class="step-item">
  13. Step 1
  14. </a>
  15. <a href="#" class="step-item">
  16. Step 2
  17. </a>
  18. <a href="#" class="step-item active">
  19. Step 3
  20. </a>
  21. <span href="#" class="step-item">
  22. Step 4
  23. </span>
  24. </div>
  25. ```
  26. ## Tooltips
  27. 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.
  28. ```html example
  29. <div class="steps">
  30. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 1 description">
  31. Step 1
  32. </a>
  33. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 2 description">
  34. Step 2
  35. </a>
  36. <a href="#" class="step-item active" data-bs-toggle="tooltip" title="Step 3 description">
  37. Step 3
  38. </a>
  39. <span href="#" class="step-item" data-bs-toggle="tooltip" title="Step 4 description">
  40. Step 4
  41. </span>
  42. </div>
  43. ```
  44. ## Color
  45. You can customize the default progress indicator by changing the color to one that better suits your design. Click [here](/docs/ui/base/colors) to see the range of available colors.
  46. ```html example
  47. <div class="steps steps-green">
  48. <a href="#" class="step-item">
  49. Step 1
  50. </a>
  51. <a href="#" class="step-item">
  52. Step 2
  53. </a>
  54. <a href="#" class="step-item active">
  55. Step 3
  56. </a>
  57. <span href="#" class="step-item">
  58. Step 4
  59. </span>
  60. </div>
  61. <div class="steps steps-red">
  62. <a href="#" class="step-item">
  63. Step 1
  64. </a>
  65. <a href="#" class="step-item">
  66. Step 2
  67. </a>
  68. <a href="#" class="step-item active">
  69. Step 3
  70. </a>
  71. <span href="#" class="step-item">
  72. Step 4
  73. </span>
  74. </div>
  75. ```
  76. ## Steps without title
  77. For designs with limited space, use progress indicators without titles and add tooltips to provide the necessary details.
  78. ```html example
  79. <div class="steps">
  80. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 1 description"></a>
  81. <a href="#" class="step-item" data-bs-toggle="tooltip" title="Step 2 description"></a>
  82. <a href="#" class="step-item active" data-bs-toggle="tooltip" title="Step 3 description"></a>
  83. <span href="#" class="step-item" data-bs-toggle="tooltip" title="Step 4 description"></span>
  84. </div>
  85. ```
  86. ## Steps with numbers
  87. Use the `steps-counter` class to create a progress tracker with numbers instead of titles and change the color to customize it.
  88. ```html example
  89. <div class="steps steps-counter steps-lime">
  90. <a href="#" class="step-item"></a>
  91. <a href="#" class="step-item active"></a>
  92. <span href="#" class="step-item"></span>
  93. <span href="#" class="step-item"></span>
  94. <span href="#" class="step-item"></span>
  95. </div>
  96. ```