Comments (2)
<Transition
enterActiveClass="transition ease-in-out duration-1000"
exitActiveClass="transition ease-in-out duration-1000"
enterClass="opacity-0"
enterToClass="opacity-1"
exitToClass="opacity-0"
<Show when={modalOpen()}>
...
</Show>
</Transition>
Per the documentation enter class
is "CSS class applied to the entering element at the start of the enter transition, and removed the frame after. Defaults toΒ "s-enter"
/." So you really want to apply the transition properties on enterActiveClass
and leaveActiveClass
. The code above will transition your search component from opacity 0 to 1 on enter and leave.
enterToClass
is where you want it to end up when it transitions in.exitToClass
is where you want it to end up when it transitions out.
Someone can correct me if I'm skipping over any important details or caveats here.
Hope this helps!
from solid-transition-group.
@mreid21 solution works perfectly! Here is my code that uses css module
<Portal>
<Transition
enterActiveClass={styles["fade--active"]}
exitActiveClass={styles["fade--active"]}
enterClass={styles["opacity-0"]}
enterToClass={styles["opacity-1"]}
exitToClass={styles["opacity-0"]}
>
<Show when={props.isOpen}>
...
</Show>
</Transition>
</Portal>
from solid-transition-group.
Related Issues (20)
- Animation examples don't seem to work on the solid JS website HOT 4
- Transition not working in tests HOT 2
- Simultaneously transitioning mismatching current element and previously
- String classes props ignored HOT 4
- feature request: better documentation HOT 2
- bug: TransitionGroup assumes that at least two children will be present
- TransitionGroup does not remove DOM elements HOT 2
- Using @solidjs/router lazy components with mode="outin" HOT 1
- Basic issue: trying the first example HOT 1
- How to use with <Outlet /> HOT 1
- `ReferenceError: Element is not defined`: SSR breaks when using `solid-transition-group` on cloudflare workers HOT 7
- onMount called before elements are connected in outin mode HOT 3
- Clarification on show() HOT 2
- Passing a class to the adhoc container element HOT 4
- TransitionGroup animates keyed shows before Suspense-Transition is done HOT 1
- solid start routes are duplicated
- is this maintained? HOT 2
- How to work with `<Dynamic>` HOT 2
- Loss of styles on exit transition when used with @suid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solid-transition-group.