# `mix tessera.gen.component`
[🔗](https://github.com/the-robot-lives/tessera/blob/v0.2.0/lib/mix/tasks/tessera.gen.component.ex#L1)

Scaffolds a tessera web component in the current Mix project:

    mix tessera.gen.component persona-card
    mix tessera.gen.component persona-card --module MyApp.Components.PersonaCard

Writes:

  * the spec module (`lib/...`, from `--module`, default
    `<AppCamel>.Components.<CamelTag>`);
  * the colocated `persona_card.mjs` template (imports
    `@noizu/tessera-core`, exports `register` — replace the body, keep the
    export, CONTRACT.md §5);
  * a web-test-runner test skeleton at `test/components/persona_card_test.mjs`.

The generated contract module (`persona_card.contract.generated.mjs`) is
written at the next `mix compile`. Run `mix tessera.install` once per host
app to wire `@noizu/tessera-core` into `assets/package.json`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
