Skip to content

Placements let you define named configurations that customize how SDK components behave on different sections of your website. Instead of using the same global settings everywhere, you can create placements like "homepage", "product-page", or "checkout" — each with its own text, styling, and behavior.

  1. Create placements in the business dashboard under your merchant’s customization settings.
  2. Assign a placement to any SDK component using the placement attribute or prop.
  3. The component resolves its configuration from the backend-driven config, applying placement-specific overrides on top of global defaults.
Global Config (dashboard defaults)
└── Placement: "homepage"
│ └── buttonShare: { text: "Share this!", clickAction: "sharing-page" }
│ └── banner: { referralTitle: "Join our community" }
└── Placement: "checkout"
└── postPurchase: { ctaText: "Share and earn {REWARD}!" }
└── buttonShare: { text: "Tell your friends" }

All Frak web components accept a placement attribute. When provided, the component looks up its configuration from the matching placement in the backend config.

<!-- Homepage: opens a full sharing page -->
<frak-button-share placement="homepage"></frak-button-share>
<!-- Product page: opens the embedded wallet -->
<frak-button-share placement="product-page"></frak-button-share>
<!-- Checkout confirmation page -->
<frak-post-purchase
placement="checkout"
customerId="cust_123"
orderId="order_456"
token="tok_abc"
></frak-post-purchase>
<!-- Show referral banner on homepage -->
<frak-banner placement="homepage"></frak-banner>
<!-- Wallet button positioned on the left for this section -->
<frak-button-wallet placement="sidebar"></frak-button-wallet>
<!-- Mobile-only button to redirect to the native app -->
<frak-open-in-app placement="mobile-landing"></frak-open-in-app>

When calling SDK actions directly (without web components), pass the placement ID as the third argument:

import {
import displayModal
displayModal
,
import displayEmbeddedWallet
displayEmbeddedWallet
} from '@frak-labs/core-sdk/actions';
// Display a modal associated with the "checkout" placement
const
const results: any
results
= await
import displayModal
displayModal
(
any
client
, {
steps: {
login: {
allowSso: boolean;
};
final: {
action: {
key: string;
};
};
}
steps
: {
login: {
allowSso: boolean;
}
login
: {
allowSso: boolean
allowSso
: true },
final: {
action: {
key: string;
};
}
final
: {
action: {
key: string;
}
action
: {
key: string
key
: "sharing" } },
},
}, "checkout");
// Display the embedded wallet for the "homepage" placement
await
import displayEmbeddedWallet
displayEmbeddedWallet
(
any
client
, {
loggedIn: {
action: {
key: string;
};
}
loggedIn
: {
action: {
key: string;
}
action
: {
key: string
key
: "sharing" } },
}, "homepage");

Each placement can customize the following components. Settings defined at the placement level override the global component defaults.

OptionTypeDescription
textstringButton text. Use {REWARD} placeholder for reward amount.
noRewardTextstringFallback text when no reward is available.
clickAction"embedded-wallet" | "share-modal" | "sharing-page"Which UI opens on click.
useRewardbooleanWhether to display the reward amount.
cssstringComponent-specific CSS override.
OptionTypeDescription
position"right" | "left"Screen position of the floating wallet button.
cssstringComponent-specific CSS override.
OptionTypeDescription
badgeTextstringText for the badge pill above the message.
refereeTextstringMessage shown to referred users. Use {REWARD} placeholder.
refereeNoRewardTextstringFallback message for referees when no reward is found.
referrerTextstringMessage shown to referrers. Use {REWARD} placeholder.
referrerNoRewardTextstringFallback message for referrers when no reward is found.
ctaTextstringCTA button text. Use {REWARD} placeholder.
ctaNoRewardTextstringFallback CTA text when no reward is found.
cssstringComponent-specific CSS override.
OptionTypeDescription
referralTitlestringTitle for the referral banner variant.
referralDescriptionstringDescription for the referral banner.
referralCtastringCTA button text for the referral banner.
inappTitlestringTitle for the in-app browser banner variant.
inappDescriptionstringDescription for the in-app browser banner.
inappCtastringCTA button text for the in-app browser banner.
cssstringComponent-specific CSS override.
OptionTypeDescription
textstringButton text override.
cssstringComponent-specific CSS override.

In addition to component-specific settings, each placement also supports:

OptionTypeDescription
targetInteractionstringThe interaction type to use for reward calculations in this placement.
translationsRecord<string, string>Placement-specific translation overrides.
cssstringGlobal CSS applied to modals displayed from this placement.

Component settings can come from two sources: placement configuration (backend-driven) and HTML attributes (inline). When both are present, HTML attributes take precedence, allowing you to override placement defaults for specific instances.

<!-- Placement "homepage" sets text to "Share this!" via the dashboard -->
<!-- But this instance overrides it with custom text -->
<frak-button-share placement="homepage" text="Share and earn up to {REWARD}!"></frak-button-share>

Here’s an example of using different placements across a website:

<!-- Homepage: referral banner + share button opening a full sharing page -->
<frak-banner placement="homepage"></frak-banner>
<frak-button-share placement="homepage"></frak-button-share>
<!-- Product page: share button opening the embedded wallet -->
<frak-button-share placement="product-page"></frak-button-share>
<!-- Checkout confirmation: post-purchase component -->
<frak-post-purchase
placement="checkout"
customerId="cust_123"
orderId="order_456"
token="tok_abc"
></frak-post-purchase>
<!-- All pages: floating wallet button -->
<frak-button-wallet placement="global"></frak-button-wallet>

Each placement is configured independently in the business dashboard, giving you full control over text, styling, and behavior per section — without changing your code.