micha-lmxt / svelte-motion

An animation library for Svelte based on framer-motion.

Home Page:https://svelte-motion.gradientdescent.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Style Tags on MotionDiv elements not working

SethBurkart123 opened this issue · comments

Information in style tags doesn't get passed through to the final div...

For example. In my case, I am trying to pass in a style attribute, but it doesn't get applied directly to the final element.

<MotionDiv
          key={index}
          class="absolute w-full pb-4"
          animate={$activeTab === index ? 'visible' : 'hidden'}
          transition={fastOpacityTransition}
          variants={contentVariants}
          style="display: {$activeTab === index ? 'block' : 'none'}"
        >
          <svelte:component this={content} />
        </MotionDiv>