Gravity UI
GravityAd renders the server-selected frame, declarative spec, or bundled card. Pass the complete ad response so the host retains its tracking and rendering metadata.
import { GravityAd } from '@gravity-ai/ui';
<GravityAd placement="below_response" ad={ad} />
For carousel frames, preserve render.items and each item's server-issued clickUrl. The GFB-1 action card:<index> opens that card's tracked URL. An unknown action or a missing/unsafe card URL uses the ad's ordinary safe destination. The host does not substitute a card's untracked landing URL or fire an additional click beacon. Native callbacks, popup handling, sandboxing and impression tracking remain unchanged.
When an ad carries a unit and no variant is pinned, GravityAd draws it with the layout that fits its container's live width and re-flows at the unit's breakpoints. rich_frame units render in the frame host, an action_card button runs onPrompt, a connect_card button runs onConnect, and a type it doesn't know draws as a plain text card. When GravityAd fetches the ad itself, it sends the slot width, the host font and theme, and what it can draw on the request automatically.
The automatic @gravity-ai/embed widget is a separate integration; it does not inherit this UI host behavior.