@shoppex/ui
A collection of React components and hooks with built-in SDK integration for building Shoppex storefronts quickly.Developer-First Approach: These components are designed to be used with AI assistance.
Simply describe what you want, and AI can compose these building blocks into custom themes.
Why @shoppex/ui?
SDK Integration
Components connect to @shoppex/sdk automatically. Cart, checkout, and store data just work.
Customizable
Built with Tailwind CSS and CSS variables. Easy to theme and extend.
Production Ready
Accessibility, keyboard navigation, loading states, and error handling built-in.
TypeScript
Full type safety with exported interfaces for all props and return values.
Installation
Quick Example
What’s Included
Primitives (Hooks)
Headless hooks for state management and SDK integration.| Hook | Description |
|---|---|
useCart() | Cart state with add/remove/update operations |
useCartItem() | Cart state for a specific product |
useStore() | Fetch store, products, and groups |
useStoreSettings() | Store configuration flags |
useSearch() | Product search with debouncing |
useProductFilter() | Filter and sort products |
useCheckout() | Checkout flow and coupon validation |
usePrice() | Price formatting |
Components
Pre-styled UI components with SDK integration.| Component | Description |
|---|---|
ProductCard | Product card with image, price, add-to-cart |
AddToCartButton | Smart button with quantity controls |
CartDrawer | Slide-over cart sidebar |
CheckoutModal | Email collection modal |
SearchCommand | Cmd+K search palette |
PriceDisplay | Formatted price display |
Blocks
Larger page sections for common storefront layouts.| Block | Description |
|---|---|
Hero | Store hero with logo, title, stats |
ProductGrid | Responsive product grid with filters |
WhyChooseUs | Features bento grid |
FAQ | Accordion FAQ section |
Footer | Store footer with links |