Prefixing components #174
Replies: 5 comments
-
When you import components, you can rename the component with prefixes. <script setup>
import { Textarea as TwTextarea } from 'flowbite-vue'
</script>
<template>
<tw-textarea label="something" />
</template> It will need some extra work, but I think it is the only way to prefix. |
Beta Was this translation helpful? Give feedback.
-
I am walking about the TW CSS classes when it builds, not the flow bite modules. Thanks. In TW you can add a prefix to the compiled classes in the TW config. |
Beta Was this translation helpful? Give feedback.
-
Hey there! Currently, our components can't handle prefixes. However, I'm actively researching ways to implement this feature. Though I don't have a specific timeline yet, rest assured that I'm working on it. |
Beta Was this translation helpful? Give feedback.
-
Great, thanks for response. |
Beta Was this translation helpful? Give feedback.
-
The reason I ask is, I am building some react components that are embeddable widgets that can be embedded in another TW website and I don’t want the styles to clash. |
Beta Was this translation helpful? Give feedback.
-
How do you add TW prefixes to the components? I know you can define the TW prefix in the TW config however this does not force the components to be built with the same prefixes rendering it useless. How might one add the TW prefixes? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions