Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CursorProps<TCursorData>

Type parameters

Hierarchy

Index

Properties

Optional as

as: string | Element

caretPosition

caretPosition: null | CaretPosition

Optional classNames

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

Class names for the root component and the subcomponents.

Optional data

data: TCursorData

Optional disableCaret

disableCaret: boolean

Whether to disable the caret.

Optional disableSelection

disableSelection: boolean

Whether to disable the selection rects.

Optional key

key: any

Optional onRenderCaret

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

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

default

styled div

Optional onRenderSelectionRect

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

Overrides Caret component

Optional prefixClassNames

prefixClassNames: string

selection

selection: null | BaseRange

selectionRects

selectionRects: SelectionRect[]

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