Skip to content

How to scale active element #582

Closed Answered by davidjerleke
MariuszRogowicz asked this question in Help
Discussion options

You must be logged in to vote

Hi @MariuszRogowicz,

You can use the approach in the scale example in the docs. It adds an additional element inside the slide element and scale that instead:

<div class="embla">
  <div class="embla__container">

    <div class="embla__slide">
      <div class="embla__slide__scale" <!-- scale this element -->>
        Slide content here
      </div>
    </div>

    ...more slides
  </div>
</div>

Note that if you have loop enabled, scaling slides can break the carousel unless you follow the scale example approach in the docs.

Best,
David

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MariuszRogowicz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
resolved This issue is resolved
2 participants