Skip to content

T4008: Unknown variant value ​

Cause ​

A variant attribute has a value the component's contract does not declare.

Example ​

xml
<contract>
{ "name": "Card", "role": "group", "parts": ["root"] }
</contract>
<template><div class="root"><Button tone="dangr">Go</Button></div></template>

What you see ​

text
ERROR  T4008  app/components/Card.tess:4:43
  Button.tone has no value "dangr".
  Did you mean "danger"?
  Run `tessera explain T4008` for details.

Fix ​

Use one of the declared values. The hint suggests the nearest.

All errors and warnings