Skip to content

Documentation / @ripl/core / ElementOptions

Type Alias: ElementOptions<TState> ​

ElementOptions<TState> = object & TState

Defined in: packages/core/src/core/element.ts:234

Options for constructing an element, combining an optional id, CSS classes, data, pointer events, and initial state.

Type Declaration ​

class? ​

optional class?: OneOrMore<string>

One or more CSS-like class names used for querying and selection.

data? ​

optional data?: unknown

Arbitrary user data bound to the element, typically the datum backing a data-driven visual.

id? ​

optional id?: string

Optional stable id; a unique type:uniqueId id is generated when omitted.

interpolators? ​

optional interpolators?: ElementInterpolators<TState>

Interpolator overrides for individual state properties, layered over the defaults the element type declares. See ElementInterpolators.

pointerEvents? ​

optional pointerEvents?: ElementPointerEvents

Which parts of the element respond to pointer hit testing. Defaults to all.

Type Parameters ​

Type ParameterDefault type
TState extends BaseElementStateBaseElementState