Configuration
Pass configuration to window.Giftie(config). Functions remain on the host
page; other non-empty values are serialized into the iframe URL.
Recording and identity
| Field | Type | Default | Behavior |
|---|---|---|---|
domain | string | localhost in the implementation | Stable site or Shopify domain. Supply it in production. |
mode | 'video' | 'audio' | 'video' | Initial recording mode. Other values fall back to video. |
occasionSelector | boolean | false | Shows the occasion selector when true. |
enableFilters | boolean | true | Set to false to disable camera filters. |
lensGroupId | string | none | Adds an approved camera lens group. Coordinate custom groups with Giftie. |
Brand and controls
| Field | Type | Default |
|---|---|---|
imageUrl | string | none |
accentColor | CSS color string | #91A0EB |
textOnBlockColor | CSS color string | #ffffff |
buttonTextColor | CSS color string | #ffffff |
buttonBgColor | CSS color string | accentColor |
buttonBorderColor | CSS color string | accentColor |
buttonBorderRadius | number or numeric string, pixels | 8 |
buttonPaddingX | number or numeric string, pixels | 24 |
buttonPaddingY | number or numeric string, pixels | 12 |
buttonBorderWidth | number or numeric string, pixels | 1 |
buttonFontSize | CSS length or number | 12px |
buttonLetterSpacing | CSS length or number | 0px |
Color values are URL-encoded by the loader. Use ordinary CSS color strings,
for example #C4652A.
Callbacks
| Field | Signature | When it runs |
|---|---|---|
onLoad | () => void | The widget iframe's browser load event fires. |
onClose | () => void | An accepted close has begun, before the loader resets its lifecycle state. |
onVideoSave | (payload: GiftieSavePayload) => void | A video or audio recording is saved, before the loader begins automatic close. |
The loader invokes callbacks directly and does not await returned promises.
Async work can therefore continue after the modal starts closing, and each
callback must catch its own promise rejection. Synchronous throws are different:
a throw from the configuration onVideoSave stops the instance save hook and
automatic close, while a synchronous onClose throw happens before lifecycle
state reset and can leave the loader inconsistent. There is no structured
onError callback in the current release.
Outside the current integration surface
Old samples contain fields such as userId, theme, and
autoCloseAfterSave. The current released widget does not consume them as
documented configuration. Do not depend on unlisted fields without explicit
confirmation from Giftie for your integration.
Configuration values are not a secret channel. Do not include access tokens, personal data, private order fields, or customer messages.
