[Help]: Is there an action/store that I can use to track the duration of a slide with the AutoPlay Plugin? #745
-
Beta Was this translation helpful? Give feedback.
Answered by
SergkeiM
Feb 14, 2024
Replies: 1 comment 2 replies
-
Hi @shyakadavis I think you can achive this with CSS only: Just change If delay is dynamic you can set it directly on the element: <div class="pills">
<div class="pill">
<div class="in active"></div>
</div>
<div class="pill">
<div class="in"></div>
</div>
<div class="pill">
<div class="in"></div>
</div>
</div> :root{
--delay: 7s
}
.pills{
display: flex;
}
.pill {
border-radius: 6px;
height: 10px;
width: 30px;
background-color: black;
margin: 0 3px;
overflow: hidden;
.in.active {
animation: fill var(--delay) linear 1;
height: 100%;
background-color: pink;
}
}
@keyframes fill {
0% {
width: 0%;
}
100% {
width: 100%;
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
shyakadavis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @shyakadavis
I think you can achive this with CSS only:
Just change
--delay
to your delay inEmbla
If delay is dynamic you can set it directly on the element:
<div class="pills" style="--delay: ${MyDelayVar}s">