Skip to Content
DocumentationIndex Level

Index Level

Displays the prevalence/priority level of a content using a bar chart icon plus a label. The inactive bars stay visible with a lower opacity so the level is always readable in comparison to the maximum.

The level prop accepts the same values as the products’ PriorityLevelType enum:

ValueFull labelShort label
pPrioritárioPrioritário
hAlta prevalênciaAlta
mMédia prevalênciaMédia
lBaixa prevalênciaBaixa

Examples

Regular

PrioritárioAlta prevalênciaMédia prevalênciaBaixa prevalência

Soft

PrioritárioAlta prevalênciaMédia prevalênciaBaixa prevalência

Basic

PrioritárioAlta prevalênciaMédia prevalênciaBaixa prevalência

Sizes

Alta prevalênciaAlta prevalênciaMédia prevalênciaMédia prevalênciaBaixa prevalênciaBaixa prevalência

Short name

PrioritárioAltaMédiaBaixa

Extra content

Anything passed as children is rendered after the label, so you can append complementary information without losing the level label.

Alta

· 12 aulas

Média prevalênciaem Clínica Médica

Custom label and icon only

Prioridade máxima

Customization

className, iconClassName and labelClassName are merged with the internal classes, so any token can be overridden.

Alta prevalênciaMédia prevalência

Icon only (IndexLevelIcon)

The icon can be used standalone, e.g. inside lists or table cells.

API

IndexLevel

PropertyTypePossible valuesDefaultDescription
levelstring”p”, “h”, “m”, “l”-Required. Priority level, matching the PriorityLevelType enum values.
variantstring”regular”, “soft”, “basic""regular”Sets the visual style. basic renders without background and without padding.
sizestring”sm”, “md""md”Sets the icon size, typography and paddings.
shortNamebooleantrue, falsefalseUses the abbreviated label (“Alta”) instead of the full one (“Alta prevalência”).
labelReact.ReactNode--Overrides the label derived from level.
hideLabelbooleantrue, falsefalseHides the label, keeping only the icon (and any children).
childrenReact.ReactNode--Extra content rendered after the label.
iconClassNamestring--Additional CSS classes applied to the icon slot.
labelClassNamestring--Additional CSS classes applied to the label slot.
classNamestring--Additional CSS classes to apply to the root element.
asChildbooleantrue, falsefalseChange the default rendered element for the one passed as a child, merging their props and behavior.
…propsAll native span props--Allows passing any other standard properties of a span element.

IndexLevelIcon

PropertyTypePossible valuesDefaultDescription
levelstring”p”, “h”, “m”, “l”-Required. Priority level rendered by the icon.
sizestring”sm”, “md""md”Icon box size — sm is 16px and md is 20px.
baseOpacitystring”40”, “20""40”Opacity of the inactive bars. IndexLevel sets 40% on regular and 20% on soft/basic.
classNamestring--Additional CSS classes to apply to the icon wrapper.
Last updated on