coderef

caret-colorBaseline · Widely available

The caret-color CSS property sets the color of the text insertion pointer in a text input.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–56Not supported
57+Supportedsince Mar 9, 2017
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–52Not supported
53+Supportedsince Apr 19, 2017
Current: 157
Safari
1–11Not supported
11.1+Supportedsince Apr 12, 2018
Current: 27
MobileChrome Android
18–56Not supported
57+Supportedsince Mar 16, 2017
Current: 155
Firefox Android
4–52Not supported
53+Supportedsince Apr 19, 2017
Current: 157
Safari iOS
1–11Not supported
11.3+Supportedsince Mar 29, 2018
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: caret-color.

Feature detection

CSS · check before using
@supports (caret-color: initial) {
  /* styles that rely on caret-color */
}

/* or in JavaScript */
if (CSS.supports("caret-color", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (3). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
caret-color57795311.1575311.3
caret-color.currentColor57795311.1575311.3
caret-color.transparent57795311.1575311.3