Skip to content

T3013: Root element does not carry the root part ​

Cause ​

The template's root element must carry class="root", because the root part is how styles, tests and docs find the component.

Example ​

xml
<contract>
{ "name": "Card", "role": "group", "parts": ["root"] }
</contract>
<template><div></div></template>

What you see ​

text
ERROR  T3013  app/components/Card.tess:2:46
  The template's root element must carry class="root".
  Add class="root" to the outermost element.
  Run `tessera explain T3013` for details.

Fix ​

Add class="root" to the outermost element.

All errors and warnings