Skip to content


Stability: experimental ⚠️ Experimental feature, use at your risk


Not actively maintained now. Try createReusableTemplate instead.

With enabling namedTemplate, <template> can be referenced like a variable.

Sometimes we need to reverse the order of the very simple components, and don't want to give the features of Vue template up and use JSX/TSX. Then this feature is much helpful.

If you support this feature, you can go to the discussion and hit like 👍 or comment.

Vue 3
Vue 3.3
Nuxt 3
Vue 2
TypeScript / Volar

Basic Usage

<script setup>
const pager = 'top'

<template name="pager">
  <span>This is pager</span>

  <template v-if="pager === 'top'">
    <template is="pager" />

  <span>Here is data table</span>

  <template v-if="pager === 'bottom'">
    <template is="pager" />

Known Usage

  • TypeScript / Volar support is not yet completed.


The avatar of contributor named as renovate[bot] renovate[bot]
The avatar of contributor named as gaokefei gaokefei