Free cookie consent management tool by TermsFeed

Tag Component

On This Page
SAIL Design System guidance available for Tags

Draw attention and drive engagement to the right places on your interface. Learn how to use tags to highlight valuable links, sections, or other components so users don't miss important or notable items.

About the tag component

Displays a list of short text labels with colored background to highlight important attributes.

See also: Tag Item, Tag design guidance

Where to use the tag component

Use a!tagField() in the following components:

Parameters

a!tagField( label, labelPosition, instructions, helpTooltip, tags, align, accessibilityText, size, showWhen, marginAbove, marginBelow )

Name Keyword Types Description

Label

label

Text

Text to display as the field label.

Label Position

labelPosition

Text

Determines where the label appears. Valid values:

  • "ABOVE" (default) Displays the label above the component.
  • "ADJACENT" Displays the label to the left of the component.
  • "COLLAPSED" Hides the label. The label will still be read by screen readers; see accessibility considerations for more information.
  • "JUSTIFIED" Aligns the label alongside the component starting at the edge of the page.

Instructions

instructions

Text

Supplemental text about this field.

Help Tooltip

helpTooltip

Text

Displays a help icon with the specified text as a tooltip. The tooltip displays a maximum of 500 characters. The help icon does not show when the label position is "COLLAPSED".

Tags

tags

List of Variant

List of tags to display. Configured using a!tagItem().

Alignment

align

Text

Determines alignment of the image(s). Valid values: "START", "CENTER", "END".

Accessibility Text

accessibilityText

Text

Additional text to be announced by screen readers. Used only for accessibility; produces no visible change.

Size

size

Text

Determines the size of the tags. Valid values: "SMALL", "STANDARD" (default), "LARGE".

Show When

showWhen

Boolean

Determines whether the component is displayed on the interface. When set to false, the component is hidden and is not evaluated. Default: true.

Margin Above

marginAbove

Text

Determines how much space is added above the layout. Valid values: "NONE" (default), "EVEN_LESS", "LESS", "STANDARD", "MORE", "EVEN_MORE".

Margin Below

marginBelow

Text

Determines how much space is added below the layout. Valid values: "NONE", "EVEN_LESS", "LESS", "STANDARD" (default), "MORE", "EVEN_MORE".

Using the tag component

The following sections cover important details about the tag component.

Using the tags parameter

  • If the tags parameter is null, contains an empty array, or only contains tag items with no text value and no icon set, then the label and instructions render with no tags displayed.
  • If multiple tags are displayed in a narrow container, tags can wrap onto multiple lines. An individual tag will never be split onto two lines.

Using the size parameter

"LARGE" renders tags at a larger scale than "STANDARD", scaling text, padding, and any icons proportionally. When "LARGE" tags appear inside a grid or table cell, the row height increases to accommodate the taller tag.

No new responsive breakpoints are introduced for "LARGE". Tags continue to wrap and truncate per existing a!tagField()` behavior at all sizes.

You can use the link parameter in a!tagItem() to add any link type to a tag. For example, tags representing categories such as product groups or sales regions can link to interfaces showing all relevant items in that category.

Examples

The following examples demonstrate the tag component.

Use the interactive editor to experiment with examples.

Display tags with custom colors

a!tagField( labelPosition: "COLLAPSED", tags: { a!tagItem( text: "Silver Member", backgroundColor: "#aaa9ad", textColor: "#ffffff" ), a!tagItem( text: "Corporate Partner", backgroundColor: "#990099" ) }, size: "STANDARD" )

Display multiple tags using looping

a!localVariables( local!skills: {"Problem-Solving", "Communication", "Creativity", "Project Management"}, a!tagField( label: "Skills", labelPosition: "ABOVE", tags: a!forEach( items: local!skills, expression: a!tagItem( text: fv!item, backgroundColor: "ACCENT" ) ), size: "STANDARD" ) )

Display a large tag with an icon

a!tagField( labelPosition: "COLLAPSED", size: "LARGE", tags: { a!tagItem( text: "Priority", backgroundColor: "NEGATIVE", icon: "exclamation-triangle", iconPosition: "START" ) } )

Feature compatibility

The table below lists this component's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Interfaces Compatible
Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Incompatible

Cannot be used to configure a process report.

Process Events Incompatible

Cannot be used to configure a process event node, such as a start event or timer event.

Process Autoscaling Incompatible

Cannot be used in autoscaled processes.

Event Consumer Filter Conditions Compatible

Can be used in filter conditions.

Event Consumer Event Handlers Compatible

Can be used in event handler expressions.

The following recipes include usage of the Tag Component.

  • Cards as Info Pattern (Cards, Formatting, Stamps):

    Use this pattern to display high level summaries of options with icons and descriptions. This pattern uses card layouts with stamp fields and rich text to create visually distinct information cards.

  • Cards as List Items Patterns (Choice Components, Images):

    Use the cards as list items pattern to create visually rich lists as an alternative to grids or feeds. This pattern uses a combination of cards and billboards to show lists of like items. You can easily modify the pattern to change the card content or the number of cards per row to fit your use case.

  • Configure a Custom Search Box with Smart Search (Grids, Query Data, Records):

    Implement smart search in a custom search box for a read-only grid.

  • Inline Tags for Side-by-Side Layout Pattern (Formatting):

    This pattern shows the best practice for combining tags with standard-sized rich text, or plain text, using a side by side layout.

Feedback