I am trying to add an overflow animation to vuetify's v-text-field, yet I can not seem to get it to work:
<script setup>
const text = 'very long long long long long text'
</script>
<template>
<div class="container">
<v-text-field v-model="text" />
</div>
</template>
<style>
.container {
width: 200px;
}
.v-field__input {
width: fit-content !important;
overflow: visible;
animation: leftright 3s infinite alternate ease-in-out;
}
.v-field__input > input {
width: 260px;
}
@keyframes leftright {
0%,
20% {
transform: translateX(0%);
left: 0%;
}
80%,
100% {
transform: translateX(-100%);
left: 100%;
}
}
</style>
(The above code can be edited here)
Whenever I set overflow to hidden of the class v-field__input the animation stops. I also have to manually set the width in pixels for the input tag. This, of course, should not be the solution, as it will be dependent on the input.
Ideally, I would like to have it behave like this: https://codepen.io/jonen/pen/oNQeoeP
Any ideas are greatly appreciated!