You are currently on Anvil1, which is now in maintenance mode. Visit Anvil2 to get the latest version of the design system.
components / Content

Tag

Default

The default tag is useful for both visually highlighting and giving user interaction to an element.

Compact

Compact tags are used in areas with small screen space and dense content.

Subtle

A tag can be deemphasized to reduce visual noise.

Tag Group

Tags are frequently paired together to form a tag group.

Close Icon

A tag can also be manually removed by a user.

Icons in Tags

An icon can add additional meaning to a scenario.

Tags in a Form

Tags in a form utilize Sematic UI for functionality.


Statuses

A status tag highlights an item's state. There are two variants per status: bold (default) and subtle. Use the default bold variant when the status tag is important on the page, and the subtle variant for less important situations or when several competing statuses exist on the page.

Info

The default status state.

Inactive

Inactive, disabled, minor states.

Success

Active success state.

Warning

Warning, likely requests user action.

Critical

Critical or error, likely needs user action.


Alternate Background Color

A alternate background color can help with labeling and differentiation between tags. This is especially helpful for user-generated tags. The color prop can accept hexcode, rgb, and token values.


Truncation

The max length of a tag's text is 270px, or about 35 characters. Tags longer than this will get cut off with ellipsis. The HTML title attribute contains the text's full content regardless. Tags will attempt to wrap when in a Tag Group.


Best Practices

  • Status tags should be quick and easy to identify.
  • Tags related to forms should be close to the input that controls adding/removing tags.
  • Tags should not exceed 35 characters in length.
  • Use badges for numerical content.

Importing

import { Tag, TagGroup } from '@servicetitan/design-system';