Skip to content

The <frak-button-share> component opens a modal in the Frak Wallet interface with configurable steps, allowing for complex user interactions such as login, opening session and share.

  • An initialized FrakSetup configuration object

More information about the FrakSetup object.

AttributeTypeDefaultDescription
textstring"Share and earn!"Text to display on the button. Include the {REWARD} placeholder to opt into the live reward flow (the SDK substitutes the estimated reward amount).
classnamestringCSS class names applied to the button.
placementstringPlacement ID for backend-driven configuration.
clickActionstring"sharing-page"Kept for backwards compatibility; every click opens the sharing page. Legacy values ("embedded-wallet", "share-modal") are accepted and routed there, and the resolved value is reported on the share_button_clicked event.
noRewardTextstringFallback text used when text contains {REWARD} but no reward is available.
targetInteractionstringTarget interaction type used to calculate the displayed reward.
previewstringRender in preview mode (e.g. Shopify/WordPress theme editor): the button stays visually enabled and the click handler is a no-op.
<frak-button-share></frak-button-share>
<frak-button-share text="Share and earn!"></frak-button-share>
<frak-button-share classname="button button-primary"></frak-button-share>

Include the {REWARD} placeholder in text to display the live estimated reward. Provide noRewardText as a fallback for when no reward is available.

<frak-button-share
text="Share and earn up to {REWARD}!"
noRewardText="Share and earn!"
></frak-button-share>

Every click opens the sharing page. clickAction no longer selects a surface — the embedded wallet and the share modal were both retired in components 1.2.0 — but it stays accepted so a stored merchant config keeps working:

<frak-button-share clickAction="sharing-page"></frak-button-share>
<frak-button-share placement="homepage"></frak-button-share>

Button text, click action, and styling are resolved from the placement configuration set in the business dashboard. HTML attributes override placement settings.

CSS can be used to style the button.

Some default styles are applied to the button, but they can be overridden with custom CSS.

Target the component using the frak-button-share .override selector.

frak-button-share .override {
background-color: #000;
color: #fff;
}

Component-specific CSS can also be configured via placements in the business dashboard.