Solid SDK Overview
The@waitify-io/fanfare-sdk-solid package provides SolidJS components and web components for the Fanfare platform. It is the foundation for all Fanfare widgets, which can be used directly in SolidJS applications or as web components in any framework.
Installation
Architecture
The Solid SDK serves two purposes:- SolidJS Components - Native SolidJS components for SolidJS applications
- Web Components - Framework-agnostic widgets that work in React, Vue, Angular, or vanilla HTML
Quick Start
SolidJS Application
Web Components (Any Framework)
Package Exports
Components
| Component | Description |
|---|---|
FanfareProvider | Context provider for SDK |
ThemeProvider | Theme context provider |
QueueWidget | Virtual waiting room widget |
DrawWidget | Lottery/raffle widget |
AuctionWidget | Real-time bidding widget |
WaitlistWidget | Pre-registration widget |
TimedReleaseWidget | Flash sale widget |
ExperienceWidget | Full journey orchestration |
Primitives
| Primitive | Description |
|---|---|
Button | Styled button component |
Card | Card container components |
Input | Form input component |
Badge | Status badge component |
Spinner | Loading spinner |
Countdown | Countdown timer display |
Progress | Progress bar component |
Hooks
| Hook | Description |
|---|---|
useFanfare | Access SDK instance |
useQueue | Queue state and actions |
useDraw | Draw state and actions |
useAuction | Auction state and actions |
useWaitlist | Waitlist state and actions |
useTimedRelease | Timed release state/actions |
useExperienceJourney | Journey orchestration |
useTranslations | i18n translations |
Web Component Registration
Why SolidJS?
The Fanfare SDK uses SolidJS for widgets because:- Small Bundle Size - SolidJS compiles to minimal JavaScript
- No Virtual DOM - Direct DOM updates for better performance
- Web Component Support - Native custom elements compilation
- Fine-grained Reactivity - Efficient state updates
TypeScript Support
Full TypeScript support with exported types:Related
- Provider - FanfareProvider setup
- Primitives - Primitive components
- Components - Widget components
- Web Components - Web component registration