Class CollisionType
Defines the types of collision handling behavior for popup elements when they exceed viewport boundaries.
Inheritance
Namespace: Syncfusion.Blazor.Popups
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class CollisionType : Enum
Remarks
The CollisionType enumeration specifies how the popup should behave when it would be positioned outside the visible area. This helps ensure popups remain visible and accessible to users regardless of the target element's position.
Examples
Usage of CollisionType in popup collision settings.
<SfPopup>
<PopupCollision X="CollisionType.Flip" Y="CollisionType.Fit" />
</SfPopup>
Fields
Fit
Specifies that the popup should be adjusted to fit within the viewport boundaries.
Declaration
public const CollisionType Fit
Field Value
Type |
---|
CollisionType |
Remarks
When set to Fit, the popup position will be adjusted to ensure it remains completely visible within the viewport. The popup may be moved or resized to accommodate the available space.
Flip
Specifies that the popup should flip to the opposite side when collision is detected.
Declaration
public const CollisionType Flip
Field Value
Type |
---|
CollisionType |
Remarks
When set to Flip, the popup will automatically reposition to the opposite side of the target element if the original position would cause the popup to exceed viewport boundaries.
None
Specifies that no collision handling should be applied to the popup.
Declaration
public const CollisionType None
Field Value
Type |
---|
CollisionType |
Remarks
When set to None, the popup will be positioned at its calculated position regardless of viewport boundaries. This may result in the popup being partially or completely hidden outside the visible area.