Icon Component Examples

The Icon component allows you to display various icons in your documentation.

Basic Usage

Here’s a basic example of using the Icon component:

Icon Sizes

You can specify different sizes for icons using various units:

You can also use pixel units:

Icon Colors

You can customize the color of icons:

Available Icons

Here are all the available icons:

Basic Icons

info
settings
triangle-alert
circle-alert
code
file-text
search
x
languages
arrow-right
arrow-left
arrow-down
arrow-up
external-link

Action Icons

pencil
copy
download
circle-check

Documentation Icons

sticky-note
lightbulb
circle-alert (important)
triangle-alert (caution)

Theme Icons

sun
moon

Using Icons in Text

Icons can be used inline with text:

This is an information message.

This is a warning message.

This is an error message.

This is a success message.

Accessibility

For accessibility purposes, you can provide a label for the icon:

When a label is provided, the icon will be announced by screen readers. Without a label, the icon is treated as decorative and will be ignored by screen readers.