Components/BaseAnchor
Since 2.5.0BETA

BaseAnchor

GSAP-powered popover with mask-reveal clip animation.

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

BaseAnchor

GSAP-powered popover with a mask-reveal animation — content slides in from the placement direction through a soft gradient edge, with physics-based easing (overshoot + bounce). No opacity transition, pure spatial reveal.

Panels use TxCard by default; control appearance via panelBackground / panelShadow / panelRadius / panelPadding. Set useCard=false when you only need a raw wrapper.

Basic Usage

BaseAnchor

Demo loads on client.

Soft Edge

BaseAnchor ships with a built-in soft mask edge. Pair with show-arrow to render a triangle that follows final floating placement and offset.

Soft Edge

Demo loads on client.

Placement

Content enters and exits from the placement direction. For top, content slides down from above and returns upward on close.

Placement Directions

Demo loads on client.

Custom Animation

Control animation duration and GSAP easing via duration and ease.

Custom Ease

Demo loads on client.

Interactive Playground

Tune key props in one panel and focus on surface differences (pure / mask / blur / glass / refraction) plus motion adaptation modes (auto / manual / off).

Surface Playground

Demo loads on client.

API

TxBaseAnchor Props

PropTypeDefaultDescription
modelValuebooleanfalseWhether popover is open (v-model).
disabledbooleanfalseDisable the popover.
placementBaseAnchorPlacement'bottom-start'Floating placement.
offsetnumber8Distance from reference element (px).
widthnumber0Panel width (0 = content-driven width).
minWidthnumber0Minimum width.
maxWidthnumber360Maximum width.
matchReferenceWidthbooleanfalseFollow reference width when width is 0.
durationnumber432Animation duration (ms).
easestring'back.out(2)'GSAP ease string for open animation.
useCardbooleantrueWrap floating content with built-in TxCard.
panelBackground'pure' | 'mask' | 'blur' | 'glass' | 'refraction''refraction'Panel background (TxCard background).
panelShadow'none' | 'soft' | 'medium''soft'Panel shadow (TxCard shadow).
panelRadiusnumber18Panel border radius (TxCard radius).
panelPaddingnumber10Panel padding (TxCard padding).
panelCardPartial<TxCardProps>undefinedPass-through advanced TxCard props (maskOpacity, fallbackMaskOpacity, surfaceMoving, refraction*).
surfaceMotionAdaptation'auto' | 'manual' | 'off''auto'Surface downgrade strategy: auto follows Anchor motion, manual reads panelCard.surfaceMoving, off disables downgrade adaptation.
showArrowbooleanfalseEnable the triangle arrow that follows floating placement.
arrowSizenumber10Arrow size in px.
closeOnClickOutsidebooleantrueClose on outside click.
closeOnEscbooleantrueClose on Escape key.
toggleOnReferenceClickbooleantrueToggle open state on reference click.

Events

EventParamsDescription
open-Fired when popover opens.
close-Fired when popover closes.
update:modelValuebooleanv-model update.

Slots

SlotDescription
referenceTrigger element.
defaultPopover content.

Exposed Methods

MethodParamsDescription
close-Programmatically close.
toggle-Programmatically toggle.
Was this helpful?