Skip to main content
Crave UI components are local React components that sit inside your storefront app. They pair with the Storefront SDK, Tailwind CSS, and shadcn/ui conventions so you can own the markup, styling, and ordering flows. Choose the setup that matches your starting point.

Use the CLI

Start from a Crave storefront template with components and SDK wiring included.

Existing app

Add the SDK, shared UI dependencies, and component source to an app you already own.

Project structure

See where components, API helpers, and shared utilities should live.

Use the CLI

For new storefronts, start with the Crave CLI. The generated template includes the Storefront SDK, component files, Tailwind setup, and environment variables.
Then run the generated app:
The template is the recommended source of truth for component file structure because the components are meant to be edited in your app.

Existing app

For an existing React or Next.js app, install the SDK first:
If your app does not already use shadcn/ui, initialize it before copying component source:
Install the shared UI utilities used by the component examples:
Then copy the Crave component source from a generated storefront template into your app’s components directory and adapt imports to match your aliases.

Project structure

Use a structure that keeps UI, data access, and ordering state separate:

Configure the SDK

Create a shared Storefront SDK client and import it from your data loaders, hooks, or server actions.
Add the required environment variables:

Import components

Crave component docs use local imports so you can customize the implementation:
Keep the component source in your app, then pass SDK data and callbacks from your own routes or state layer.

Next steps

Components Overview

Browse the full component catalog.

Storefront SDK

Configure the typed API client used by the components.

Display Menu

Fetch menu data and render categories, products, and modifiers.

Manage Cart

Wire cart creation, item updates, discounts, and checkout handoff.