Retrieve page details, offers, add-ons, and offer groups using the Limio SDK useCampaign hook and offer utilities.
The useCampaign hook is the primary way to access page-level data in your components. A Page in Limio acts as a container for offers and optional add-ons, and can store custom attributes that drive content, logic, or display behaviour.
The tag the user entered the page with (for tracking)
Displaying offers
The most common pattern is to destructure offers from useCampaign and render a card for each one. Offers contain pricing, display attributes, product references, and attachments.
Offers can be grouped by their group__limio attribute (e.g. "monthly" vs "yearly"). The groupOffers utility organises offers into labelled groups for tabbed or sectioned layouts.
Parameters:
Param
Type
Description
offers
ElasticOffer[]
The offers array from useCampaign
groupLabels
Group[]
Group definitions — typically from component props or groupValues
Each Group has { id: string, label: string, thumbnail?: string }.
Returns an array of GroupInfo objects:
Field
Type
Description
groupId
string
The group identifier (matches group__limio on offers)
id
string
Same as groupId
label
string
Display label for the group
offers
ElasticOffer[]
Offers belonging to this group
thumbnail
string
Optional thumbnail URL for the group
Offers without a group__limio attribute are placed in an "Other" group.
Example — tabbed pricing page with monthly/yearly toggle:
Example groupLabels and output
Input groupLabels (typically passed as a component prop):
Output from groupOffers:
Add-ons
Add-ons are optional products attached to a page — typically upsells or extras that complement a base offer. Destructure addOns from useCampaign to access them. Add-ons share the same structure as offers, with a record_type of "add_on" and their own price__limio charges.
Example add-on object
Page attributes
Access custom attributes configured on the page itself through campaign.attributes. These drive content, layout logic, or checkout behaviour.
Example campaign object
Offer utility functions
The SDK exports additional utilities for working with offers. These are most commonly used in subscription management views rather than acquisition pages.
checkActiveOffers()
Filters an array of offers to return only those that are currently active based on their start and end dates.
Param
Type
Default
Description
offers
ElasticOffer[]
[]
Offers to filter
includeFuture
boolean
false
Include future-dated offers
useOfferInfo()
Extracts and normalises common offer attributes into a typed object — useful for rendering offer cards with consistent logic.
Returns:
Field
Type
Description
displayName
string
Product display name or group label
hasRecurringCharge
boolean
Whether the offer has a recurring price charge
isAutoRenew
boolean
Whether auto-renewal is enabled
allowMultibuy
boolean
Whether quantity selection is allowed
isDelivery
boolean
Whether the offer includes physical delivery
offerImage
Attachment
First image attachment on the offer
isGift
boolean
Whether this is a gift redemption offer
usesExternalPrice
boolean
Whether pricing is fetched externally
productNames
string[]
Names of products included in the offer
offerDescription
string
MMA description text
See also
Basket (Cart) — Adding offers to the basket and checking out