diff --git a/content/template-tag-recommended.md b/content/template-tag-recommended.md new file mode 100644 index 000000000..6c7a09896 --- /dev/null +++ b/content/template-tag-recommended.md @@ -0,0 +1,142 @@ +--- +title: Template Tag has reached Recommended Stage +authors: + - edward-faulkner + - katie-gengler +date: 2026-06-23T00:00:00.000Z +tags: + - ember-polaris + - '2026' + - template-tag + - embroider +--- + +[Template Tag](https://guides.emberjs.com/release/components/template-tag-format/) is +a component authoring format that combines the component's JavaScript and Glimmer +template code in to a single file. + +You may also hear this referred to as `GJS` or `GTS` after the file extensions. + +This format has been the default for newly generated projects and components +since [Ember's 6.8 release](https://blog.emberjs.com/ember-released-6-8/) and the +[RFC for Template Tag](https://rfcs.emberjs.com/id/0779-first-class-component-templates/) +has now reached the [Recommended stage](https://github.com/emberjs/rfcs#recommended). + +An RFC reaching the Recommended stage means that the team +believes the feature to be complete, polished, incorporated by the ecosystem, into the docs, +and is ready for widespread adoption. + +## "Done Done" aka Polish and Completeness + +Template Tag reaching this stage is the culmination of a many-year effort by the +Ember team to improve the ergonomics of component authoring. While many of you may +have been using Template Tag for some time, the team now considers the feature to be +**complete**. + +This required much work beyond the implementation of the format itself: + +- Edits to the [guides](https://guides.emberjs.com/release/components/template-tag-format/), tutorials, and API docs to use the new format in examples. +- Support for the new file extensions with syntax highlighting in editors, GitHub, and our documentation. +- Creation of new lint rules and implementation of the existing rules for the new format. +- Updates to blueprints to generate using the new format. +- Production of a codemod to make it easier to migrate existing projects to Template Tag. +- Support of [Template Tag in Routes](https://rfcs.emberjs.com/id/1046-template-tag-in-routes). +- [Support for authoring component tests in Template Tag](https://rfcs.emberjs.com/id/0785-remove-set-get-in-tests). +- Updates to the Ember Inspector to support the new format. +- TypeScript support for the new format via the creation of [Glint](https://github.com/typed-ember/glint). + + +## Examples + +The simplest example of this format is template-only: + +```gjs {data-filename="app/components/avatar.gjs"} + +``` + +With Template Tag you can also wrap `