Skip to content

Documentation / @ripl/vue / useRiplElement

Function: useRiplElement() ​

useRiplElement(): ShallowRef<Element<Partial<BaseState>, ElementEventMap> | undefined>

Defined in: adapters/vue/src/compositions/index.ts:83

Returns the nearest enclosing element, group or scene.

Use this from a component nested inside a <ripl-group> to reach the group it belongs to, for imperative work the declarative surface does not cover.

Returns ​

ShallowRef<Element<Partial<BaseState>, ElementEventMap> | undefined>

The element, or undefined outside any element component.