Skip to main content

Highlight

A short, important message displayed inline and in context. Different from a Toast, which is global.

Polymorphic Component

By default, content is rendered inside a <div>, but this can be overriden by passing any valid tag name or component with the as prop.

Examples

Default Highlight

<Highlight
size="small|medium(default)"
>
This is a simple highlight.
</Highlight>

With Title

<Highlight
...
title="Big Ol' Title"
>
...
</Highlight>

With Highlight, Critical, Warning, and Success States

<Highlight
...
state="highlight(default)|critical|warning|success"
>
...
</Highlight>

With Icon

<Highlight
...
icon="placeholder"
>
...
</Highlight>

Props

NameTypeDefault ValueRequiredDescription
icon"head" | "circle" | ReactElement<any, string | JSXElementConstructor<any>> | "placeholder" | IconName | "accordion-caret-down" | ... 13 more ...NoAn icon to render at the end of the highligh.
size"small" | "medium" | HighlightSizeHighlightSize.MediumNoThe size of the highlight.
state"critical" | "warning" | "success" | State | "highlight"State.HighlightNoThe state of the highlight.