Get Started
Vue3Split is Vue3 wrapper for Split.js
Installation
bash
pnpm i vue3-splitbash
yarn add vue3-splitbash
npm i vue3-splitPrerequisites
WARNING
Temporary Config Required
The above usage requires setting app.config.unwrapInjectedRef = true to make injections automatically unwrap computed refs. This will become the default behavior in Vue 3.3 and this config is introduced temporarily to avoid breakage. It will no longer be required after 3.3.
If you use Vue js below 3.3 you need to configure the following option in your Vue app:
js
app.config.unwrapInjectedRef = true;Import
Simply importing the two components you need from vue-split
html
<script setup lang="ts">
import { SplitWrapper, SplitItem } from 'vue-split'
</script>
<template>
<SplitWrapper>
<SplitItem>
<div>First item</div>
</SplitItem>
<SplitItem>
<div>Second item</div>
</SplitItem>
</SplitWrapper>
</template>
</script>