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.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- registerrequired( 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.
- unregisterrequired(id: string) => void
- Removes a previously registered item from the layout.
- mainRectrequiredRef<ILayer>
- Reactive bounding-box of the main content area after all items have claimed their space.
- mainStylesrequiredRef<CSSProperties>
- Computed CSS properties applied to the main content slot (padding offsets derived from registered items).
- getLayoutItemrequired(id: string) => ILayerItem | undefined
- Retrieves the ILayerItem record for the given item id.
- itemsrequiredRef<Array<ILayerItem>>
- Reactive list of all currently registered layout items.
- layoutRectrequiredRef<DOMRectReadOnly | undefined>
- DOMRect of the layout root element, updated by a ResizeObserver.
- rootZIndexrequiredRef<number>
- Base z-index from which layout item z-indices are calculated.
- layoutIdrequiredComputedRef<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