@flexprice/flexprice-ui) is a library of exportable React components extracted from the Flexprice dashboard. Use them to embed the same UI in your application without rebuilding it.
Components are presentational: they do not fetch, authenticate, or route. UI and data stay separate. You can feed any component from:
- Flexprice JavaScript SDK
- Flexprice REST APIs
- Your own backend
- Your own APIs
- Static JSON
Why use Flexprice UI
Install the package and render dashboard-matched UI from your data instead of building screens from scratch.- Responsive, mobile-optimized layout
- Dark mode
- Theme customization via CSS variables
- TypeScript types
- Works with any backend
- Compatible with SSR (Next.js App Router and Pages Router, Remix, Astro)
Install
Peer dependencies
react and react-dom (v18).
Stylesheet
Import the stylesheet once in your app:Ways to provide data
Every component follows the same pattern: fetch data from a source you choose, map it into the presentational props the component expects, and render.Option 1: Flexprice SDK (recommended)
Option 2: Flexprice REST APIs
Option 3: Your own backend
Option 4: Your own APIs
Option 5: Static JSON
Best for documentation sites, marketing pages, and demos.Which approach to use
Component pages document the exact prop shapes and any adapters for mapping Flexprice API responses.
Theming
Override CSS variables on a wrapping element:dark class to any ancestor to toggle dark mode:
Event callbacks
Components expose callbacks for user actions (selection, checkout, contact sales, and similar). Wire them to analytics, Checkout, a payment provider, or your own flow. See each component page for the callbacks it supports.Server-side rendering
Components work with SSR in Next.js (App Router and Pages Router), Remix, and Astro. Fetch data on the server when you can, then pass it as props to avoid client-only waterfalls.Typical integration flow
1
Install the package
Add
@flexprice/flexprice-ui and ensure react / react-dom are available as peer dependencies.2
Import stylesheet and components
Import
@flexprice/flexprice-ui/style.css once, then import the components you need.3
Choose a data source
Pick Flexprice SDK, REST APIs, your backend, your own APIs, or static JSON — see Ways to provide data.
4
Fetch and map data
Load records from your source and map them into each component’s presentational props (adapters are documented on the component pages).
5
Pass props and render
Pass the mapped data (and any callbacks) into the component and render it in your page or layout.
Future components
The package is designed to expand beyond the current exports. Planned surfaces may include:- Checkout
- Customer portal
- Usage dashboard
- Subscription details
- Invoice viewer
- Usage charts
- Wallet and credits
- Billing history
@flexprice/flexprice-ui, load data from any source, map into props, and render.
See also
Current pricing exports:Pricing Widget
Full pricing selector with billing toggle, plan grid, and CTAs.
Pricing Table
Comparison table for multiple plans, features, and entitlements.
Pricing Card
Single plan card for dashboards, modals, and custom layouts.

