Headless React
This package is a set of fully customizable React components that can be used to build a headless UI for a Firmhouse Storefront. For now, it only supports building a custom checkout page, but we are planning to add more components in the future.
Installation
To install the package, you can run the following command:
Usage
To use the components, you need to wrap them in a FirmhouseCartProvider
component and pass the apiToken
prop. You should provide a storefront access token that you can get from the Firmhouse Portal.
Components
FirmhouseCartProvider
: A provider component that wraps the other components and provides them with the necessary data and functionality.CheckoutForm
: A form component that allows users to fill in their details and place an order. This is the main component that you need to use to build a custom checkout page.OrderedProductsList
: A list component that displays the products that the user has ordered. You can use this component to show the products that the user has added to their cart.OrderSummary
: A summary component that displays the total price of the order. You can use this component to show the total price of the order.Translated
: A component that allows you to translate text in your components. You can use this component to provide translations for your components.
Last updated