# `PhoenixVapor.Vue`
[🔗](https://github.com/elixir-volt/phoenix_vapor/blob/v0.6.1/lib/phoenix_vapor/vue.ex#L1)

Load Vue Single File Components (`.vue` files) as LiveView function components.

## Usage

    defmodule MyAppWeb.Components do
      use Phoenix.Component

      PhoenixVapor.Vue.component :card, "vue/Card.vue"
      PhoenixVapor.Vue.component :dashboard, "vue/Dashboard.vue"
    end

The path is relative to the module's file, and can be any expression known
at compile time, such as `Path.join(@templates, "Card.vue")`.

This compiles the Vue template at compile time via `Vize.split_template/2`
and generates a function component that renders it against assigns.

The SFC's `<template>` block becomes the component. A `<style scoped>`
block is compiled and exposed as `__vue_css_<name>__/0`, and the root
element gets its scope attribute. `<script>` blocks are ignored.

# `component`
*macro* 

Define a function component from a `.vue` file's template.

Supports `<style scoped>` — generates scoped CSS and injects
the `data-v-*` scope attribute into the root element.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
