ILayoutProvide

interface
Layout & Sizing

Internal provide/inject contract exposed by OrigamLayout to its registered layout items — do not use directly in application code.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

register
required
( vm: ComponentInternalInstance, options: { id: string order: Ref<number> position: Ref<TDirectionBoth> layoutSize: Ref<number | string> elementSize: Ref<number | string | undefined> active: Ref<boolean> disableTransitions?: Ref<boolean> absolute: Ref<boolean | undefined> } ) => { layoutItemStyles: Ref<CSSProperties> layoutItemScrimStyles: Ref<CSSProperties> zIndex: Ref<number> }
Called by useLayoutItem to register a new docked item and receive reactive style refs.
unregister
required
(id: string) => void
Removes a previously registered item from the layout.
mainRect
required
Ref<ILayer>
Reactive bounding-box of the main content area after all items have claimed their space.
mainStyles
required
Ref<CSSProperties>
Computed CSS properties applied to the main content slot (padding offsets derived from registered items).
getLayoutItem
required
(id: string) => ILayerItem | undefined
Retrieves the ILayerItem record for the given item id.
items
required
Ref<Array<ILayerItem>>
Reactive list of all currently registered layout items.
layoutRect
required
Ref<DOMRectReadOnly | undefined>
DOMRect of the layout root element, updated by a ResizeObserver.
rootZIndex
required
Ref<number>
Base z-index from which layout item z-indices are calculated.
layoutId
required
ComputedRef<string>
Unique id of the layout instance, used to scope CSS properties.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Injecting the layout context in a custom layout item

typescript