Skip to content

Tag

A tag component for marking and categorizing. Supports multiple theme types, display styles, and closable functionality.

Platform Compatibility

App (vue)App (nvue)H5Mini Program

Basic Usage

  • Use type to set the tag type. Default is default.
html
<see-tag>Default</see-tag>
<see-tag type="primary">Primary</see-tag>
<see-tag type="success">Success</see-tag>
<see-tag type="warning">Warning</see-tag>
<see-tag type="danger">Danger</see-tag>
<see-tag type="info">Info</see-tag>

Theme Effects

  • Use effect to set the tag style. Supports dark (filled), light (light background), and plain (outlined). Default is light.
html
<see-tag type="primary" effect="dark">Dark</see-tag>
<see-tag type="primary" effect="light">Light</see-tag>
<see-tag type="primary" effect="plain">Plain</see-tag>

Sizes

  • Use size to set the tag size. Supports large, default, and small.
html
<see-tag type="primary" size="large">Large</see-tag>
<see-tag type="primary">Default</see-tag>
<see-tag type="primary" size="small">Small</see-tag>

Round Tags

  • Set round to true for a pill-shaped tag.
html
<see-tag type="primary" round>Round</see-tag>
<see-tag type="success" round effect="dark">Round</see-tag>

Closable Tags

  • Set closable to true to show a close button.
  • Triggers onClose event when closed.
html
<see-tag type="primary" closable @on-close="handleClose">Tag</see-tag>

Mark Style

  • Set mark to true for a tag with straight left edge and rounded right edge.
html
<see-tag type="primary" mark>Mark</see-tag>
<see-tag type="success" mark effect="dark">Mark</see-tag>

Border (Hit)

  • Set hit to true to display the tag border.
html
<see-tag type="primary" hit>Hit</see-tag>
<see-tag type="primary" hit effect="plain">Hit</see-tag>

Disabled State

  • Set isDisabled to true to disable the tag. Click events will not fire.
html
<see-tag type="primary" is-disabled>Disabled</see-tag>
<see-tag type="primary" closable is-disabled>Disabled Closable</see-tag>

Custom Colors

  • Use color to set a custom color (overrides type color).
  • Use bgColor, textColor, borderColor for fine-grained control.
html
<see-tag color="#7232dd">Custom</see-tag>
<see-tag color="#7232dd" effect="dark">Custom Dark</see-tag>
<see-tag bg-color="#fdf0ff" text-color="#7232dd" border-color="#e8d0f8">Fully Custom</see-tag>

Notice

Custom colors are hardcoded values and will not adapt to dark/light theme changes.

Props

PropertyDescriptionTypeDefaultOptions
typeTag typeString'default''default' 'primary' 'success' 'warning' 'danger' 'info'
sizeTag sizeString'default''small' 'default' 'large'
effectDisplay effectString'light''dark' 'light' 'plain'
closableWhether closableBooleanfalse-
roundWhether roundBooleanfalse-
colorCustom colorString''-
bgColorCustom background colorString''-
textColorCustom text colorString''-
borderColorCustom border colorString''-
isDisabledWhether disabledBooleanfalse-
markWhether mark styleBooleanfalse-
hitWhether show borderBooleanfalse-

Events

EventDescriptionParameters
onClickFires when tag is clickedevent: Event
onCloseFires when close button is clickedevent: Event

Slots

SlotDescription
defaultTag content

Liao ICP No. 2025070134