Skip to content

Single Line Text Control

SingleLineText control allow user add content with single line text input.

Usage

import { SingleLineText, registerChaiBlock } from "@chaibuilder/blocks";
const YourBlock = ({ content }) => {
return <p>{content}</p>
}
registerChaiBlock(YourBlock, {
type: 'YourBlock',
label: 'Your Block',
category: 'Basic',
props: {
content: SingleLineText({ title: "Content", default: "Default content" })
}
})

Arguments

  • default - Default value for control.
  • title - Title of control visible in Chai Builder block settings panel
  • placeholder - Placeholder text for control
  • binding - Binding flag for control. Default value is true. If false then control will not be visible in binding panel.