Reference Source
import {Tag} from '@adobe/coral-spectrum'
public class | source

Tag

Expression Extends:

class Tag extends BaseComponent(HTMLElement)

Mixin Extends:

HTMLElement, BaseComponent

A Tag component

See:

Example:

Markup
<coral-tag></coral-tag>
JS constructor
new Coral.Tag();

Static Member Summary

Static Public Members
public static

Returns Tag colors.

public static

Returns Tag sizes.

Member Summary

Public Members
public

Whether this component can be closed.

public

The tags's color. See TagColorEnum.

  • Coral.Tag.color.DEFAULT by default.
  • reflected

public

The tag's label element.

  • content-zone

public

A multiline tag for block-level layout with multiline text.

public

A quiet tag to differentiate it from default tag.

public

The tag's size. See {@link {TagSizeEnum}. Only colored tags can have different sizes.

  • TagSizeEnum.MEDIUM by default.
  • reflected

public
public

Value of the tag.

Static Public Members

public static color: TagColorEnum: * source

Returns Tag colors.

Return:

TagColorEnum

public static size: TagSizeEnum: * source

Returns Tag sizes.

Return:

TagSizeEnum

Public Members

public closable: Boolean source

Whether this component can be closed.

  • false by default.
  • reflected

public color: String source

The tags's color. See TagColorEnum.

  • Coral.Tag.color.DEFAULT by default.
  • reflected

public label: TagLabel source

The tag's label element.

  • content-zone

public multiline: Boolean source

A multiline tag for block-level layout with multiline text.

  • false by default.
  • reflected

public quiet: Boolean source

A quiet tag to differentiate it from default tag.

  • false by default.
  • reflected

public size: String source

The tag's size. See {@link {TagSizeEnum}. Only colored tags can have different sizes.

  • TagSizeEnum.MEDIUM by default.
  • reflected

public trackingElement: * source

Inherited from BaseComponent#trackingElement.

public value: String source

Value of the tag. If not explicitly set, the value of Node.textContent is returned.

  • "" by default.
  • reflected