Skip to main content Red Hat Design System logo Contribute on Github v2.0.0 Home
About About the design systemHow we buildRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridPersonalization patternsSpacingTypography
Tokens Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries
Elements All elements Accordion Alert Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Call to action Card Code block Dialog Footer Health index Icon Navigation (primary)Planned Navigation (secondary) Pagination PopoverPlanned Progress stepsPlanned Site status Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Patterns All patternsAnnouncementCardDisclosureFilterFormLinkLink with iconLogo wallSearch barSkip navigationSticky bannerSticky cardTabsTileVideo thumbnail
Accessibility FundamentalsContentDesignDevelopmentContributorsQa and testingAssistive technologiesResources
Design/code status Release notes Get support

Tag

Overview Style Guidelines Code Demos Accessibility
  1. Installation
  2. Usage
  3. rh-tag
  1. Installation
  2. Usage
  3. rh-tag

Installation

Usage

<rh-tag color="red">Red Hat</rh-tag>

rh-tag

Slots 2
Slot Name Description
icon

Contains the labels's icon, e.g. web-icon-alert-success.

undefined

Must contain the text for the label.

Attributes 4
DOM Property Description Type Default
icon

The icon to display in the label.

IconNameFor<IconSetName> | undefined
unknown
iconSet

Icon set to display in the label

IconSetName
'ui'
variant

The variant of the label.

'filled' | 'outline' | undefined
'filled'
color

The color of the label.

'blue' | 'cyan' | 'green' | 'orange' | 'purple' | 'red' | 'grey' | undefined
unknown
Methods 0

None

Events 1
Event Name Description
close

when a removable label's close button is clicked

CSS Shadow Parts 1
Part Name Description
icon

container for the label icon

CSS Custom Properties 5
CSS Property Description Default
--rh-tag-margin-inline-end

The margin at the end of the direction parallel to the flow of the text.

4px
--rh-tag-padding-block-start

The padding at the start of the direction perpendicular to the flow of the text.

4px
--rh-tag-padding-block-end

The padding at the end of the direction perpendicular to the flow of the text.

4px
--rh-tag-padding-inline-start

The padding at the start of the direction parallel to the flow of the text.

8px
--rh-tag-padding-inline-end

The padding at the end of the direction parallel to the flow of the text.

8px
Design Tokens 0

None

© 2021-2024 Red Hat, Inc. Deploys by Netlify