VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-shadows/

⇱ Bootstrap 5 Shadows - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Shadows

Last Updated : 4 Apr, 2024

Bootstrap 5 Shadows utility comprises four classes: shadow-none, shadow-sm, shadow, and shadow-lg. They add or remove shadows from components, with `shadow-none` removing any existing shadow and others adding varying shadow sizes.

Bootstrap 5 Shadows:

  • Sass: It is a collection of variables and utilities to tweak the values of the shadow by changing the variables in Bootstrap's source code.

Bootstrap 5 Shadows Classes:

ClassDescription
shadowApply default box shadow to the element.
shadow-noneRemove any box shadow from the element.
shadow-smApply small box shadow to the element.
shadow-lgAdd a large box shadow to the element.

Examples of Bootstrap 5 Shadows

Example 1: In this example, we used the shadow-none and the shadow-lg classes to remove and add shadows to the card component.

Output:

👁 bootstrapShadow
Bootstrap 5 Shadows Example Output


Example 2: In this example, we used the shadow-sm and shadow classes to add the shadows to the cards.

Output:

👁 Image

Reference: https://getbootstrap.com/docs/5.2/utilities/shadows/

Comment

Explore