Bootstrap – Focus Ring


Bootstrap – Focus ring



”;


This chapter discusses about adding and modifying custom focus ring styles to various elements and components.

In Bootstrap 5, the focus ring is a visual indicator that appears around an element when it receives focus. The focus ring is a circular outline that appears around the element, typically in a contrasting color, to indicate that the element is currently active and ready to receive input from the user.


Bootstrap 5 provides a built-in focus ring that is applied to interactive elements such as buttons, links, and form controls by default.

The default outline on :focus is removed by the helper class .focus-ring, thus replacing it with a box-shadow.

Let”s see an example showing the usage of .focus-ring: