VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-interactions-text-selection/

⇱ Bootstrap 5 Interactions Text Selection - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Interactions Text Selection

Last Updated : 29 Nov, 2022

Bootstrap 5 Interactions Text selection helps us to change the way when a user tries to select the content displayed. 

Bootstrap 5 Interactions Text selection Classes:

  • user-select-all: When this class is active the entire text will get selected.
  • user-select-auto: When this class is active user can select any amount of text.
  • user-select-none: When this class is active user cannot select any text.

Syntax: The * can be substituted with values like all, auto, and none.

<p class="user-select-*">
 ...
</p>

Example 1: In this example, we will learn about classes like user-select-all and user-select-auto.

Output:

👁 Image
Bootstrap 5 Interactions Text Selection

Example 2: In this example, we will learn about classes likeuser-select-none.

Output:

👁 Image
Bootstrap 5 Interactions Text Selection

References: https://getbootstrap.com/docs/5.0/utilities/interactions/#text-selection

Comment

Explore