Skip to main content

IClassicRendering interface

📖 Description​

Interface that specifies the block renderer interface. Used when creating custom blocks.

📃 Type declaration​

interface IClassicRendering {
  required?: boolean;ReadonlyOptional
  hideRequiredIndicatorFromName?: boolean;ReadonlyOptional
  marginAroundBlock?: boolean;ReadonlyOptional
  render?: (props: IClassicRenderProps) => ReactNode;FunctionOptional
}
🖱ī¸ Hover with the mouse over a property name for a tooltip with the description of that property. Click it for more information.

🗃ī¸ Properties​


🏷ī¸ hideRequiredIndicatorFromName​

Specifies if the required asterisk (*) should be invisible. If this property is not specified or set to false, the required indicator is shown for required blocks.

Type​

boolean


🏷ī¸ marginAroundBlock​

Specifies if a margin around the block should be shown.

Type​

boolean


🏷ī¸ required​

Specifies if the block is required.

Type​

boolean

â–ļī¸ Functions​


🔧 render​

Specifies a function that is invoked when the block needs to render. This function should return a valid React component.

Signature​

(props: IClassicRenderProps) => ReactNode

Parameters​

NameTypeOptionalDescription
propsIClassicRenderPropsNoContains the rendering props.

Return value​

Returns the ReactNode for the block.

tip

Read the Custom blocks guide for an example.