Halogen.Widgets.Motion
- Package
- purescript-halogen-widgets
- Repository
- afcondon/purescript-halogen-widgets
Optional, opt-in transition timing for the widgets that can animate a state change (the accordion chevron, the accordion body reveal).
The kit's default is NoMotion — instant, no easing — on purpose: the
house style is restraint, and a widget toolkit should not impose animation
on consumers who did not ask for it. A consumer opts a single widget into
an eased transition by passing Motion (or the ready-made defaultMotion)
in that widget's Input. Nothing animates library-wide; you turn it on
where you want it.
transition renders the CSS declaration these widgets splice into their
inline styles, and emits the empty string under NoMotion — so the
un-opted-in path adds no transition at all. (For users who opt in but set
the OS "reduce motion" preference, css/halogen-widgets.css carries a
prefers-reduced-motion block that neutralises these transitions.)
#Motion Source
data MotionWhether — and how — a state change animates. NoMotion is the default
everywhere; Motion d e eases over duration d with timing function e.
Constructors
#defaultMotion Source
defaultMotion :: MotionA pleasant opt-in default for callers who just want "animate it, sensibly": 180 ms, decelerating. Pass this rather than inventing a duration.
- Modules
- Halogen.
Widgets. Accordion. Internal - Halogen.
Widgets. Compare - Halogen.
Widgets. DoubleKnob - Halogen.
Widgets. Field - Halogen.
Widgets. HAccordion - Halogen.
Widgets. Knob - Halogen.
Widgets. Modal - Halogen.
Widgets. Motion - Halogen.
Widgets. Panel - Halogen.
Widgets. SegmentedControl - Halogen.
Widgets. Select - Halogen.
Widgets. Slider - Halogen.
Widgets. Stepper - Halogen.
Widgets. Style - Halogen.
Widgets. Toast - Halogen.
Widgets. Toggle - Halogen.
Widgets. VAccordion