Skip to content

Icon Control

Icon control allow user select an icon or add svg code

Usage

import { Icon, registerChaiBlock } from "@chaibuilder/blocks";
const YourBlock = ({ icon }) => {
return React.createElement("span", {
dangerouslySetInnerHTML: { __html: icon }
});
}
registerChaiBlock(YourBlock, {
type: 'YourBlock',
label: 'Your Block',
category: 'Basic',
props: {
icon: Icon({ title: "Icon", default: '' })
}
})

Arguments

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