Skip to Content
Notion UI

Icon Block

Display an icon, emoji, image, or text.

Icon Block Emoji

<IconBlock size="md" icon={{ type: "emoji", src: "🚀" }} />

Installation

pnpm add @notion-kit/ui

Options


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:

  1. emoji: An emoji icon, whose src is the emoji string. See Emoji Cheat Sheet.
  2. lucide: A Lucide icon, whose src is the name of the icon. See Lucide Icons.
  3. url: An image URL. The image will be displayed in the block.
  4. text: A text string. Only the first letter of src will be displayed in the block.

Prop

Type

On this page