Components
Build custom React components to create unique checkout experiences with Ollie Shop’s template system
What are Components?
Components are React-based UI elements that integrate seamlessly with Ollie Shop’s backend through our APIs. They allow you to create custom checkout experiences while maintaining clean separation between presentation and business logic.
How Components Work
Ollie Shop uses a Template and Slot system:
- Templates: Pre-defined layouts with designated areas (slots) for components
- Slots: Specific positions where components can be placed
- Components: Your custom React elements that fill these slots
Every template includes default (native) components that you can replace with custom ones, or you can add components to empty slots.
Component Requirements
Every Ollie Shop component must include:
Required Files
index.tsx
- Your React componentpackage.json
- Dependencies and metadatanode_modules/
- Installed dependenciesstyles.css
- (Optional) Custom styling
The total component package cannot exceed 5MB when compressed as a ZIP file.
package.json Configuration
Your package.json
must include the Ollie Shop SDK as a dependency:
Component Implementation
The index.tsx
file must export a React component as the default export:
Styling
We recommend using Tailwind CSS for styling. Import your styles in the main component file:
Deploying Components
To upload a component to your store, follow our comprehensive development guide:
Development Tutorial
Complete guide on creating and deploying components to your store