Tag
A native status tag with six variants, an optional status dot, text fallback and click events. Switch Chalk/OEM component themes from the header.
Status variants
Status dot
Text and slots
Click events
type defaults to undefined: no variant class is added when omitted. value defaults to an empty string and renders as plain text; the default slot takes precedence. circle defaults to true and is decorative.
disabled
type="disabled" is a gray visual variant, not a disabled control: it still emits click. click receives the original MouseEvent and keeps native bubbling/default behavior. The legacy documentation omitted this payload; the implementation is the compatibility baseline.
Interactive example
On-demand import
import NfTag from '@94ai-plus/nf-tag'
import '@94ai-plus/nf-theme-chalk/nf-tag.css'
app.use(NfTag)Types
import type { TagProps, TagType } from '@94ai-plus/nf-tag'
// TagType: 'disabled' | 'success' | 'info' | 'warning' | 'danger' | 'tip'Props
| Attribute | Description | Type | Accepted values | Default |
|---|---|---|---|---|
| type | Type; disabled changes appearance only, not click behavior | string | disabled / success / info / warning / danger / tip | undefined |
| circle | Whether to show the dot | boolean | — | true |
| value | Text displayed when the default slot is absent | string | — | '' |
Events
| Event | Description | Payload |
|---|---|---|
| click | Click callback with the original MouseEvent | event: MouseEvent |
Slots
| Slot | Description | Payload |
|---|---|---|
| default | Tag content | — |
Migration notes
Preserves all three props, the default slot, div root and click behavior. Chalk info text/dot remains #0b73ff; OEM follows the theme primary color (default #007555). Its background stays #e7f1ff. Other colors and dimensions remain unchanged.
Business text comes from value or slots and is not translated automatically. The tag does not add button semantics or keyboard behavior; use appropriate accessible buttons/links for actions. Incorrect ai-action-md event/slot anchors in the old tag page are not claimed, to avoid conflicts with the real action page. Tag routes use their own anchors.
