← All notes

Vue v-for renders a list from an array

Answer: v-for renders a list of items from an array. The required syntax is item in items, where items is the source array and item is an alias for the current element.

Scope

Inside the v-for scope, template expressions can also use parent scope properties. An optional second alias is the index of the current item.

Compiler

transformFor uses createStructuralDirectiveTransform for for. It creates the loop render function expression now and later adds the iterator, using RENDER_LIST.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vue.js docs, List Rendering, CC BY 4.0, text only (vuejs/docs); Vue.js core, compiler-core vFor transform, MIT (vuejs/core). Notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE).

Cite this

Permanent ID: iil:note:xw53tjhg

iinventedlight. 2026. "Vue v-for renders a list from an array." iinventedlight Library, iil:note:xw53tjhg, version of 2026-11-10. https://iinventedlight.com/library/notes/vue-list-rendering/. License: CC-BY-4.0.

@misc{iil_note_xw53tjhg,
  author = {{iinventedlight}},
  title = {{Vue v-for renders a list from an array}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-10},
  url = {https://iinventedlight.com/library/notes/vue-list-rendering/},
  note = {Permanent ID iil:note:xw53tjhg. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vue-list-rendering.md.