vue-flext
v2.1.1
Published
A Powerful Templating Engine
Maintainers
Readme
Vue Flext
Vue Flext is a lightweight wrapper around Flext. It compiles Handlebars‑like templates with a small set of macros and modules and exposes the result through a simple Vue component. The library ships with ESM and UMD bundles.
Vue Flext is maintained by TrustMe.
Example
<script setup lang="ts">
import { ref } from 'vue';
import Flext from 'vue-flext';
const template = ref(`
{{!-- @v "1.0.beta3" --}}
{{!-- @use "put" --}}
<div class="text-center text-red-500">{{ put data.helloWorld 'No hello world...' }}</div>
`);
const data = ref({ helloWorld: 'Hello World!' });
</script>
<template>
<Flext :template="template" v-model="data" />
</template>Installation
- Install dependencies:
npm i vue-flext tailwindcss @trustme24/flext- Add the CSS import in your CSS file:
@import "vue-flext/index.css";- You're all set!
Vue Flext by Kenny Romanov
TrustMe
