OverlayMask
OverlayMask create a highlight area on some DOM element with overlay.
install | yarn add @clayui/core |
---|---|
version | 3.123.0 |
OverlayMask
Property | Description |
---|---|
bounds {
height: number;
width: number;
x: number;
y: number;
} | Sets the current value of bounds to define the highlight area (controlled). |
children React.ReactNode | ((ref: React.RefObject<T>) => React.ReactNode) | Sets the element that will receive the highlight. |
onClick (event: React.MouseEvent<SVGRectElement>) => void | Callback is called when the overlay is clicked. |
padding number | Set the highlight padding. The default value is 10 |
visible boolean | Sets the current visibility of the overlay. The default value is false |
defaultBounds {
height: number;
width: number;
x: number;
y: number;
} | Sets the default value of bounds (uncontrolled). The default value is { height: 0, width: 0, x: 0, y: 0, } |
onBoundsChange InternalDispatch<Bounds> | Callback is called when the bounds changes (controlled). |