Quick Start

Build Your First Component

In this guide, you'll create an announcement bar component in React, push it to Oaysus with a single command, and see it appear in the visual page builder. Once it's there, your marketing team can update the message anytime without touching code or waiting for deployments.

What you're building

Free shipping on orders over $50
5 minutes
Requires: Node.js 18+ and an Oaysus account
1

Set up your environment

Install the CLI

Terminal
npm install -g @oaysus/cli

Authenticate

Terminal
oaysus login

Enter your email and click the magic link we send you.

Create a theme pack project

Terminal
oaysus theme init my-components && cd my-components

Choose React, Vue, or Svelte when prompted. We'll use React in this guide.

2

Create the component

Replace the example component with a simple announcement bar. Each component needs two files:

components/AnnouncementBar/index.tsx
1export default function AnnouncementBar({ message }) {
2  return (
3    <div className="bg-blue-600 text-white py-3 px-4 text-center font-medium">
4      {message}
5    </div>
6  );
7}
components/AnnouncementBar/schema.json
1{
2  "displayName": "Announcement Bar",
3  "props": {
4    "message": {
5      "type": "string",
6      "default": "Free shipping on orders over $50"
7    }
8  }
9}

The schema defines what marketing can edit. They change the message, you never touch the code.

3

Push to Oaysus

Terminal
oaysus theme push
Validated 1 component
Built and bundled (2.1 KB)
Uploaded to Oaysus
Published!
4

Use it in the page builder

Install your theme pack

  1. 1Open your Oaysus dashboard
  2. 2Go to ContentTheme Packs
  3. 3Click Install on your theme pack

Build a page

  1. 1Go to PagesCreate Page
  2. 2Drag the Announcement Bar onto the canvas
  3. 3Edit the message and click Publish

Done. Your marketing team is unblocked.

Next time they need to update the announcement, they do it themselves. "20% off this weekend" or "New arrivals in stock." No ticket, no deploy, no waiting on you.

Keep going: