Add to basket
A product image that arcs into the basket icon, with a recoil and ripple on arrival.
API reference
Components
<AddToBasketImage />
Wraps product artwork that flies into the basket.
children?
Product artwork that flies into the basket.
className?
Merged onto the wrapping element.
ref?
Imperative handle driving the flight.
<AddToBasketTarget />
Wraps the basket so it can take the hit and ripple on impact.
children?
Basket icon or any landing element.
className?
Merged onto the wrapping element.
ref?
Imperative handle driving the recoil.
<AddToBasketButton />
Styled trigger with theme snap hover/tap feel.
children?
The button's visible label.
className?
Merged onto the button element.
disabled?
Disable while an add is in flight.
onClick?
Click handler, typically calls addToBasket.
Functions
addToBasket
Runs the full fly-to-basket choreography. Resolves true at the landing beat.
addToBasket(options: AddToBasketOptions): Promise<boolean>image
The AddToBasketImage handle.
basket
The AddToBasketTarget handle.
direction?
Which way the flight arc bends.
Featured in
See the add to basket composed into full sections.

