Skip to Content
DevelopersComponents

Components

OberonCMS uses Puck components. Define them in the browser-safe config at oberon/client.config.tsx. Use defineOberonComponent to infer prop types from supported fields.

oberon/client.config.tsx
import { defineOberonComponent, type OberonClientConfig } from "@oberoncms/core" const Text = defineOberonComponent({ fields: { text: { type: "text" }, }, defaultProps: { text: "Welcome to OberonCMS", }, render: ({ text }) => <div>{text}</div>, }) export const clientConfig: OberonClientConfig = { version: 1, components: { Text }, }

OberonComponent is the typed equivalent of Puck’s ComponentConfig. Use it when you need explicit prop types. Component entries can also include transforms to migrate stored props.

Use the Puck documentation  for fields, slots, categories, and root configuration. Keep server-only plugins out of this file.

Last updated on