Skip to content

Styles Control

Styles control allow user to styling of block.

Usage

import { Styles, registerChaiBlock } from "@chaibuilder/blocks";
const YourBlock = ({ styles }) => {
return (
<div {...styles}>
Your Block
</div>
)
}
registerChaiBlock(YourBlock, {
type: 'YourBlock',
label: 'Your Block',
category: 'Basic',
props: {
styles: Styles({ default: "text-3xl bg-red-500"})
}
})

Arguments

  • default - Default value of styles. User can pass any valid tailwind css class names