New IconRadioGroup control

The IconRadioGroup control adds an icon-based radio group panel to the Makeswift builder, letting developers offer visual icon options for component properties like alignment, layout direction, or style variants.

  • Kebab-case icon values — Pass icons as bare strings (e.g., "text-align-left", "arrow-right") or use the IconRadioGroup.Icon accessor
  • 169 built-in icons — Full set of icons covering alignment, arrows, layout, logos, and more
  • Typed generic prop — The control passes the selected option’s value as a typed string to your component

Example

1import { IconRadioGroup } from "@makeswift/runtime/controls";
2
3runtime.registerComponent(TextBlock, {
4 type: "text-block",
5 label: "Text Block",
6 props: {
7 alignment: IconRadioGroup({
8 label: "Alignment",
9 options: [
10 { value: "left", label: "Left", icon: "text-align-left" },
11 { value: "center", label: "Center", icon: "text-align-center" },
12 { value: "right", label: "Right", icon: "text-align-right" },
13 ],
14 defaultValue: "left",
15 }),
16 },
17});

For full documentation, see the IconRadioGroup control reference.