Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CursorOverlayProps<TCursorData>

Type parameters

Hierarchy

  • Pick<CursorProps<CursorData>, "disableCaret" | "disableSelection" | "onRenderCaret" | "onRenderSelectionRect" | "as" | "classNames" | "prefixClassNames" | "styles">
    • CursorOverlayProps

Index

Properties

Optional as

as: string | Element

Optional classNames

classNames: RootClassName & Record<"caret" | "selectionRect", string>

Class names for the root component and the subcomponents.

Optional containerRef

containerRef: RefObject<HTMLElement>

Container the overlay will be rendered in. If set, all returned overlay positions will be relative to this container.

Optional cursors

cursors: Record<string, CursorState<TCursorData>>

Cursor states to use for calculating the overlay positions, by key.

Optional disableCaret

disableCaret: boolean

Whether to disable the caret.

Optional disableSelection

disableSelection: boolean

Whether to disable the selection rects.

Optional onRenderCaret

onRenderCaret: RenderFunction<Pick<CursorProps<CursorData>, "data" | "caretPosition">>

Custom caret component. For example, you could display a label next to the caret.

default

styled div

Optional onRenderCursor

Overrides Cursor component.

Optional onRenderSelectionRect

onRenderSelectionRect: RenderFunction<Pick<CursorProps<CursorData>, "data"> & { selectionRect: SelectionRect }>

Overrides Caret component

Optional prefixClassNames

prefixClassNames: string

Optional refreshOnResize

refreshOnResize: boolean

Whether to refresh the cursor overlay positions on container resize.

default

true

Optional styles

styles: Partial<RootStyles> & Partial<{ caret: CSSProp<any>; selectionRect: CSSProp<any> }>

Customized styling that will layer on top of the default rules.

Generated using TypeDoc