# @prenta/sections-react

Public React renderer for [Prenta CMS](https://github.com/actuate-media/prenta)
page sections — the canonical `PageSection[]` contract — with a
consumer-controlled renderer registry.

```bash
npm install @prenta/sections-react
```

## Usage

```tsx
import { SectionList, registerSectionRenderer } from '@prenta/sections-react'

// Register renderers for your custom section types (built-ins are included)
registerSectionRenderer('my-hero', ({ section, ctx, options }) => (
  <MyHero {...(section.content as MyHeroContent)} />
))

// Render a resolved page
<SectionList sections={page.sections} ctx={{ siteUrl }} />
```

The same custom types can be made editable in the admin via
`defineSectionTypes()` + `sections.types` in `prenta.config.ts`, and rendered
in the editor canvas via `AdminRoot`'s `sectionRenderers` prop.

## Release notes

See [CHANGELOG.md](./CHANGELOG.md) (shipped with the package) or the
[GitHub releases](https://github.com/actuate-media/prenta/releases).

## License

MIT
