cursors.mdx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ---
  2. title: Cursors
  3. summary: You can use different cursors to reflect the intended user interaction with particular elements of an interface. The cursor will change when a user hovers over a given element to indicate the action which can be performed.
  4. description: Custom cursors for enhanced interaction.
  5. ---
  6. ## Cursor utilities
  7. Use one of the available cursor utilities depending on the action you want to indicate.
  8. - `.cursor-auto`- the cursor style depends on what's inside a given element
  9. - `.cursor-pointer` - a pointing cursor, used to show that an element is clickable
  10. - `.cursor-move` - a cursor which shows that a given element can be moved
  11. - `.cursor-not-allowed` - a cursor which shows that a user is not allowed to perform an action on an element
  12. - `.cursor-zoom-in` - a cursor which shows that a user can zoom in
  13. - `.cursor-zoom-out` - a cursor which shows that a user can zoom out
  14. - `.cursor-default` - the default cursor
  15. - `.cursor-none` - no cursor
  16. - `.cursor-help` - a cursor which shows that help information is available
  17. - `.cursor-progress` - a cursor which shows that an action is in progress
  18. - `.cursor-wait` - a cursor which shows that a user cannot interact with the element because it is busy
  19. - `.cursor-text` - a cursor which shows that a user can type
  20. - `.cursor-v-text` - a cursor which shows that a user can type in a vertical text input
  21. - `.cursor-grab` - a cursor which shows that a user can grab an element
  22. - `.cursor-grabbing` - a cursor which shows that a user is grabbing an element
  23. ```html
  24. <div class="cursor-auto">auto</div>
  25. <div class="cursor-pointer">pointer</div>
  26. <div class="cursor-move">move</div>
  27. <div class="cursor-not-allowed">not-allowed</div>
  28. <div class="cursor-zoom-in">zoom-in</div>
  29. <div class="cursor-zoom-out">zoom-out</div>
  30. <div class="cursor-default">default</div>
  31. <div class="cursor-none">none</div>
  32. <div class="cursor-help">help</div>
  33. <div class="cursor-progress">progress</div>
  34. <div class="cursor-wait">wait</div>
  35. <div class="cursor-text">text</div>
  36. <div class="cursor-v-text">vertical-text</div>
  37. <div class="cursor-grab">grab</div>
  38. <div class="cursor-grabbing">grabbing</div>
  39. ```
  40. The results can be seen in the example below.
  41. ```html example height="20rem" separated centered
  42. <div class="cursor-auto bg-light p-3">auto</div>
  43. <div class="cursor-pointer bg-light p-3">pointer</div>
  44. <div class="cursor-move bg-light p-3">move</div>
  45. <div class="cursor-not-allowed bg-light p-3">not-allowed</div>
  46. <div class="cursor-zoom-in bg-light p-3">zoom-in</div>
  47. <div class="cursor-zoom-out bg-light p-3">zoom-out</div>
  48. <div class="cursor-default bg-light p-3">default</div>
  49. <div class="cursor-none bg-light p-3">none</div>
  50. <div class="cursor-help bg-light p-3">help</div>
  51. <div class="cursor-progress bg-light p-3">progress</div>
  52. <div class="cursor-wait bg-light p-3">wait</div>
  53. <div class="cursor-text bg-light p-3">text</div>
  54. <div class="cursor-v-text bg-light p-3">vertical-text</div>
  55. <div class="cursor-grab bg-light p-3">grab</div>
  56. <div class="cursor-grabbing bg-light p-3">grabbing</div>
  57. ```