caret-shape

Determines the visual shape of the text cursor. You can choose between the standard vertical bar, a block, or an underscore (terminal-style).

It is documented as part of the CSS Basic User Interface specification. This is an experimental technology. The syntax and behavior are still subject to change.

/* Usage Example */
.retro-terminal {
  /* Changes the cursor to a terminal-style block */
  caret-shape: block;
}

/* Syntax */
caret-shape: auto;
caret-shape: bar;
caret-shape: block;
caret-shape: underscore;

/* Global values */
caret-shape: inherit;
caret-shape: initial;
caret-shape: revert;
caret-shape: revert-layer;
caret-shape: unset;
Limited availability Since 2020 48% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

144+
144+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC