Template
ELI5 — The Vibe Check
A template is the HTML part of your component — the blueprint for what it looks like. In Vue you write it inside a tag. In React you return JSX. It's the thing that says 'render a button here, show this text there'.
Real Talk
A component template defines the HTML structure that the component renders. In Vue, the block is compiled into render functions. In React, JSX in the return statement serves the same purpose. Templates can contain dynamic expressions, directives, and child components.
Show Me The Code
<template>
<div class="user-card">
<img :src="user.avatar" />
<h2>{{ user.name }}</h2>
<p>{{ user.bio }}</p>
</div>
</template>
When You'll Hear This
"Keep logic out of the template — move it to computed properties." / "The template is just HTML with superpowers."
Related Terms
Component
A component is a self-contained LEGO brick for your UI.
Directive
Directives are special HTML attributes that tell Vue (or Angular) to do something special with an element.
Render
Render is another developer-friendly hosting platform that does web services, databases, cron jobs, and static sites all in one place.
Slot
A slot is a placeholder in a component where a parent can inject its own custom content.
Vue
Vue is a JavaScript framework for building interactive UIs. It's famous for being easy to pick up — HTML developers feel right at home.