Skip to content

chillingpulsar/sbr

Repository files navigation

sbr

Svelte 5 renderer for Strapi rich-text blocks. Tailwind v4–friendly; override blocks and modifiers as needed.

Install

bun add sbr-mike
npm i sbr-mike
pnpm add sbr-mike
yarn add sbr-mike

Use

<script lang="ts">
	import { BlocksRenderer } from 'sbr-mike';

	const content = [
		{ type: 'paragraph', children: [{ text: 'Hello world' }] },
		{ type: 'heading', level: 2, children: [{ text: 'Title' }] }
	];
</script>

<BlocksRenderer {content} />

Optional blocks and modifiers props override default components.

import type { RootNode, Node, BlocksContent, ParagraphBlockNode, HeadingBlockNode } from 'sbr-mike';

Licensed under the GNU General Public License v3. See LICENSE for details.

About

Svelte blocks renderer for strapi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors