Compact inline label that can optionally expose a localized dismiss affordance.
Install @wyrd-company/react or the Flutter package and use it directly —
your DESIGN.md does the styling.
catalog/contracts/tag.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: Tagtag: wyrd-tagpackage: wyrd.component.tagtitle: Tagsummary: Compact inline label that can optionally expose a localized dismiss affordance.relationships:related-to: - quality-parity-and-gatesclassification:category: data-displaycomposition: single-slotinteractive: truetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: is-dismissibletype:kind: booleanrequired: falsedefault: falsereflects: trueserializable: truesummary: Shows a dismiss control that emits the dismiss event.slots: - name: contentcontent: truerequired: truecardinality: exactly-oneaccepts: - textsummary: Visible tag label read inline with surrounding content.events: - name: dismisspayload:action:kind: action-refbubbles: truecomposed: truecancelable: truesummary: Canonical event emitted by the dismiss affordance.states: - name: defaultsource: platformsummary: Non-dismissible tag. - name: dismissiblesource: propertysummary: Tag with visible dismiss affordance.parts: - name: rootsummary: Styled tag root.slots: - content - name: dismisssummary: Dismiss control.tokens:background: color.surface-containerforeground: color.on-surfaceradius: rounded.fullmessages: - key: tag.dismissdescription: Accessible label for the dismiss control of a dismissible tag.obligations:accessibility:role: nonekeyboard: - Tab moves focus to the dismiss control when present. - Enter or Space activates the dismiss control when focused.semantics: - The tag itself adds no standalone semantics. - The dismiss control is a button named by the component-owned localized message.behavior:model: statelessinteractions: - Activating the dismiss affordance emits dismiss.hostEffects: - Dispatch dismiss event.conditions: - rtl - reduced-motion - cvd-deuteranopia - density-compact - text-expansionsdui:status: serializableserializableProperties: - is-dismissibleserializableSlots: - contenteventBindings: - dismissnotes: Tag serializes its dismissible state, label text, and optional dismiss binding.examples: - name: defaultstate: defaultproperties:is-dismissible: falseslots:content: Frontend - name: dismissiblestate: dismissibleproperties:is-dismissible: trueslots:content: Priorityoverrides:react:slots:content: content
01
Examples
Generated from the contract's examples block.
Previews are the published @wyrd-company/react component, themed by the
brand's role tokens — flip the site's light/dark toggle and they follow.
Shows a dismiss control that emits the dismiss event.
03
Slots & events
Slot
Cardinality
Accepts
Summary
content
exactly-one
text
Visible tag label read inline with surrounding content.
Event
Payload
Summary
dismiss
action
Canonical event emitted by the dismiss affordance.
04
Tokens
The contract's token bindings. Open the shared contextual sidebar from any example;
primary swatches reflect the color you pick there. Error swatches show the active
preset's values; editing any knob switches to custom and resets error to TWW · Ink.
Binding
Token
background
color.surface-container
foreground
color.on-surface
radius
rounded.full
05
States
State
Source
Summary
default
platform
Non-dismissible tag.
dismissible
property
Tag with visible dismiss affordance.
06
Accessibility
From the contract's accessibility obligations. Role none
Tab moves focus to the dismiss control when present.
Enter or Space activates the dismiss control when focused.
The tag itself adds no standalone semantics.
The dismiss control is a button named by the component-owned localized message.