InputCaretRenderer
Lightweight UI graphic that renders the text input caret as a filled rectangle. This is the caret extension point: subclass and override OnPopulateMesh (reading CaretRect / BlinkVisible) for custom shapes — block cursor, underline, gradient — then assign via CaretRenderer.
Remarks
RectMask2D clipping within the input field viewport. Blink behavior: the caret toggles visibility every CaretBlinkInterval seconds. After CaretBlinkTimeout seconds of inactivity the caret stops blinking and remains visible. Any user interaction (typing, cursor movement, selection change, focus) should call ResetBlink to restart the cycle.Application-wide accessibility flag: when, caret renderers suppress the blink animation and keep the caret continuously visible. Mirrors iOS 17+ "Prefer Non-Blinking Cursor" and the macOS Reduce Motion cursor sub-setting — surface the platform pref here from your integration layer, alongside PrefersReducedMotion.
Caret width as a fraction of the caret's height (which tracks the component's font size), so the caret keeps the same proportion to the text at any canvas scale or resolution. The default renderer draws the rectangle this wide; custom shapes may ignore or reinterpret it.
protected Rect CaretRect{ get }Latest caret rectangle in local coordinates, for subclass mesh builders.
public static Action PrefersNonBlinkingCaretChangedOccurs when PrefersNonBlinkingCaret has changed so observers can re-arm visuals. InputCaretRenderer subscribes automatically.
