Interface VisualEdgeInsetsOptions
action?: "absThis" | "padTarget" | "padThis";
debug?: boolean;
parent?: boolean | FindParentOptions;
sides?: VisualEdgeSides;
store?: MinimalWritable<BoxSides>;
[key: string]: unknown;
}
Indexable
-
[key: string]: unknown
Allows unknown keys. When an unknown key changes it is ignored, but an update to visual edge constraint calculation occurs. This is useful in the context of local theme changes that may not be picked up by the global ThemeObserver subscription.
Properties
Optionalaction
Specifies which element applies the visual edge constraints inline styles and the type of styles to apply.
- `absThis`: Applies inline styles to the direct action element for absolute positioning within visual edge
constraints of target / parent element.
- `padTarget`: Applies inline styles padding the target / parent element with that elements visual edge
constraints.
- `padThis`: Applies inline styles padding the direct action element with the visual edge constraints of the
target / parent element.
The most common action to use is padTarget, but for absolutely positioned overlays use absThis.
Optionaldebug
When true, enables console logging of which element is being targeted for visual edge detection, the constraints calculated, along with any element that is has inline styles applied.
Optionalparent
Enables parent element targeting for visual edge constraint detection.
- `true`: Direct parent element is the target.
- `false`: The action element is the target.
- `FindParentOptions` object: This configuration object is passed to `findParentElement`.
Optionalsides
Which constraint / box sides to apply.
Note: The extended sides options only apply with action: 'padTarget'. For absolute positioning action: 'absThis'
all four edge constraints are always applied.
Optionalstore
A store that is updated with visual edge constraints. Updates to the calculated constraints occur even if sides
is false.
Options for applyVisualEdgeInsets.