Module
Freedom.Transition
- Package
- purescript-freedom-transition
- Repository
- purescript-freedom/purescript-freedom-transition
#Transition Source
type Transition = { activeClassName :: String, delay :: Milliseconds, startClassName :: String }
The type of transition
startClassName
: The class name when start transitionactiveClassName
: The class name for transitiondelay
: Delay for real DOM manipulation. you should set transition duration
#Config Source
type Config = { enter :: Maybe Transition, leave :: Maybe Transition }
The type of transition config
enter
: The transition for adding nodesleave
: The transition for removing nodes
You have to style children like:
.enter {
opacity: 0;
}
.enter.enter-active {
opacity: 1;
transition: opacity 0.3s linear;
}
.leave {
opacity: 1;
}
.leave.leave-active {
opacity: 0;
transition: opacity 0.3s linear;
}
- Modules
- Freedom.
Transition