Getting Started
Simple steps to get you started using the Limio SDK.
The Limio SDK is a React library that gives your custom components access to everything they need — offers, basket operations, user data, subscriptions, checkout state, and more. You import hooks like useCampaign or useBasket, and the platform injects the live data at runtime.
What can you build?
Most Limio components fall into one of these categories:
Offer / pricing cards
useCampaign, useBasket
Display plans, let users add to basket
Cart and checkout UI
useBasket, useCheckout
Show basket contents, order totals, promo codes
Account pages
useUser, useSubscriptions
Display profile, active subscriptions
Billing and invoices
useUserAccountInformation, useUserInvoices
Show invoices, payment info, account balances
Subscription management
useSubscriptions, useBasket
Change plan, cancel, update add-ons
Install the SDK
The SDK is listed as a peer dependency — Limio provides it at runtime. Add it so your editor and bundler can resolve the types:
npm install --save @limio/sdk
# or
yarn add @limio/sdkYour first component — an offer card
Here's a minimal component that reads the offers configured for the current page and lets the user add one to the basket:
What's happening here:
useCampaign()returns theoffersarray configured for the current Limio pageuseBasket()gives you the methods to add items to the basketEach offer's display data lives under
offer.data.attributes— things likedisplay_name__limio,display_price__limio, andcta_text__limioinitiateCheckoutcreates a new basket;addOfferToBasketadds to an existing onebasketLoadingistruewhile an async basket operation runs — use it to disable buttons and prevent double-clicks
Accessing offer attributes
Every offer carries its configuration under offer.data.attributes. The most common fields:
display_name__limio
The offer's display name
display_price__limio
Formatted price string (e.g. "$29/mo")
display_description__limio
Short description text
offer_features__limio
Rich HTML string listing features
cta_text__limio
Call-to-action button text
price__limio
Array of charge objects with value, currencyCode, type
group__limio
Group label for grouping offers into tabs or sections
For setting up your component repo, local Storybook development, configurable props, and deploying to Limio, see the Custom Components guide.
Common patterns
Loading and error states
Wrap your component with ErrorBoundary and provide a Skeleton for Suspense:
Page Builder detection
Use useLimioContext to detect when your component is rendering inside the Page Builder. This is useful for showing placeholder content during editing:
SDK reference
For full details on each hook, see the dedicated pages:
Last updated
Was this helpful?

