The caret property for CSS is shorthand for setting caret-color and caret-shape.
object.style.caret = "value";
<'caret'> = <'caret-color'> || <'caret-shape'>
<'caret-color'> = auto | <color>
auto
Automatically specified by the user agent.
<color>
Specifies the color using a keyword or a numerical specification.
<'caret-shape'> = auto | bar | block | underscore
auto
Automatically specified by the user agent.
bar
A thin bar placed at the insertion point.
block
A rectangle overlapping the next visible character following the insertion point.
underscore
A thin line under the next visible character following the insertion point.