Icon Block
Display an icon, emoji, image, or text.
Icon Block Emoji
<IconBlock size="md" icon={{ type: "emoji", src: "🚀" }} />Installation
pnpm add @notion-kit/uiOptions
Size
Use the size prop to control the size of the button.
Icon Block Sizes
<IconBlock size="sm" icon={icon} />
<IconBlock size="md" icon={icon} />
<IconBlock size="lg" icon={icon} />
<IconBlock size="xl" icon={icon} />Examples
Lucide Icon
Icon Block Lucide
<IconBlock
size="md"
icon={{ type: "lucide", src: "badge-euro", color: "#3e9392" }}
/>Image Url
Icon Block Url
<IconBlock
size="md"
icon={{ type: "url", src: "https://github.com/shadcn.png" }}
/>Text
Icon Block Text
<IconBlock size="md" icon={{ type: "text", src: "John" }} />API Reference
IconBlock
Prop
Type
type IconData
There are 4 types of icons:
emoji: An emoji icon, whosesrcis the emoji string. See Emoji Cheat Sheet.lucide: A Lucide icon, whosesrcis the name of the icon. See Lucide Icons.url: An image URL. The image will be displayed in the block.text: A text string. Only the first letter ofsrcwill be displayed in the block.
Prop
Type