DEV Community

Shivam Jha
Shivam Jha

Posted on

Changing caret color with CSS

With all of the fun stuff that you can do in CSS, you can even change the caret color: that's right.
Caret is a thin blinking line that appears inside inputs, textboxes, etc.

Image description

Just with one line of CSS:

.selector {
  caret-color: red;
} 
Enter fullscreen mode Exit fullscreen mode

And the support is basically universal too! (~94% at the time of writing this post)

Top comments (0)