Runtime events and attributes

Runtime attributes connect theme-owned HTML to shared platform behavior. Use themeRuntimeProps; do not hand-write data-upstorr-* attributes in TypeScript.

import { themeRuntimeProps } from '@upstorr/theme-sdk/v1';

const attributes = themeRuntimeProps.productAddToCart({
  productId,
  variantId,
});

The SDK includes attributes for product purchase, cart drawers, checkout fields and actions, account flows, orders, wishlist, bookings, digital delivery, editor selection and approved interactive patterns.

Public runtime events include cart updates, wishlist updates, editor selection and theme toasts. Use the typed helpers such as useThemeCartUpdatedEvent where React is appropriate, or listen for the event name exposed by THEME_RUNTIME_EVENTS.

Runtime attributes request behavior; they do not move visual design outside the theme. The section or block still owns its element, label, icon, layout and CSS.

Do not use editor attributes to bypass normal shopper interactions. Preview-only behavior must be explicit and must not become live-store business logic.