Skip to main content

Examples

Primary 40

Fieldset Disabled

V2 variants pick up the disabled treatment via a CSS disabled: fallback, so buttons inside a <fieldset disabled> are dimmed even without the disabled prop.

V2 Matrix

Contrast 24

V2 Negative

Props

IconButton

A button containing only an icon. Use when an action can be represented by an icon alone (e.g. close, send). Always pair with an aria-label for accessibility. Shape is size-driven for the standard variants: the 24 size is squared (rounded-xs), every larger size is circular. Bespoke variants (brand, contrast, messaging, navTray, tertiaryDestructive, stop, microphone) stay circular at all sizes. field is the exception that is never circular — it takes the inputs’ rounded-sm so it matches the fields it sits beside. Use it at 32, 40 or 48: those are the sizes Select offers, and the variant only earns its surface when it lines up with one.
ReactNode
required
Icon element to render inside the button.
number
When provided, displays a Count badge at the top-right corner.
boolean
default:"false"
Forces the dark-surface treatment regardless of theme. Only honoured on the primary, secondary, tertiary, and outline variants.
"24" | "32" | "40" | "48" | "52" | "72"
default:"40"
Size of the button in pixels.
"stop" | "error" | "brand" | "primary" | "secondary" | "tertiary" | "outline" | "white" | ...
default:"primary"
Visual style variant of the icon button.Full type: "stop" | "error" | "brand" | "primary" | "secondary" | "tertiary" | "outline" | "white" | "tertiaryDestructive" | "contrast" | "black" | "messaging" | "navTray" | "microphone" | "field".

Exported types

Also exported from @fanvue/ui: IconButtonProps, IconButtonSize, IconButtonVariant.
Setup: Installation · Theming