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