How add Tailwind in Vue js SFC playground #13563
-
How i can add Tailwind in Vue js Sandbox? - https://play.vuejs.org/ I know exactly how to connect other libraries, for example ElementPlus (https://element-plus.run/) or Vuetify (https://element-plus.run/), but I can't guess how to connect tailwind |
Beta Was this translation helpful? Give feedback.
Answered by
alex-krasikau
Apr 22, 2024
Replies: 1 comment 1 reply
-
Hey @kr1ke! You can utilize Tailwind CSS CDN for this. While I'm not a Vue expert, this approach could work. Maybe you can find a better way to integrate it. <script setup>
import { ref } from 'vue'
const msg = ref('Hello World!')
const tailwindScript = document.createElement('script')
tailwindScript.setAttribute('src', 'https://cdn.tailwindcss.com')
document.head.appendChild(tailwindScript)
</script>
<template>
<h1 class="text-sm">{{ msg }}</h1>
<input v-model="msg" />
</template>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kr1ke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @kr1ke!
You can utilize Tailwind CSS CDN for this. While I'm not a Vue expert, this approach could work. Maybe you can find a better way to integrate it.