Documentación offline Vue 3 main

Built-in Special Elements

main Documentación oficial Licencia MITDescargado el 2026-08-02

En esta página

Built-in Special Elements#

:::info Not Components <component>, <slot> and <template> are component-like features and part of the template syntax. They are not true components and are compiled away during template compilation. As such, they are conventionally written with lowercase in templates. :::

<component>#

A "meta component" for rendering dynamic components or elements.

  • Props

ts interface DynamicComponentProps { is: string | Component }

  • Details

The actual component to render is determined by the is prop.

  • When is is a string, it could be either an HTML tag name or a component's registered name.

  • Alternatively, is can also be directly bound to the definition of a component.

  • Example

Rendering components by registered name (Options API):

```vue

```

Rendering components by definition (Composition API with <script setup>):

```vue