Appearance
OrigamTranslateBottom
<OrigamTranslateBottom> enters from translateY(calc(50vh + 50%)) — the slot rises from below the viewport — and lands at the natural position. Use for bottom sheets, mobile dialogs, action sheets, or any content that should feel anchored to the bottom of the screen.
Basic usage
vue
<template>
<OrigamTranslateBottom>
<BottomSheet v-if="open">…</BottomSheet>
</OrigamTranslateBottom>
</template>CSS classes emitted
origam-transition--translate-bottom-enter-active { transition: 225ms decelerate; }
origam-transition--translate-bottom-leave-active { transition: 125ms accelerate; }
origam-transition--translate-bottom-enter-from,
origam-transition--translate-bottom-leave-to { transform: translateY(calc(50vh + 50%)); }pointer-events: none is applied during the active phases so the user doesn't tap a moving target.
CSS variables consumed
Declared in assets/css/tokens/light.css. Before #538 these were CSS literals inside the component's own <style> block — no theme could reach them.
| Variable | Default |
|---|---|
--origam-transition--translate-bottom-enter-active---transition-duration | 225ms |
--origam-transition--translate-bottom-enter-active---transition-timing-function | var(--origam-motion__easing---decelerate) |
--origam-transition--translate-bottom-leave-active---transition-duration | 125ms |
--origam-transition--translate-bottom-leave-active---transition-timing-function | var(--origam-motion__easing---accelerate) |
Override at the document root or on a specific instance:
css
.my-panel {
--origam-transition--translate-bottom-enter-active---transition-duration: 0.15s;
}Props
<OrigamTranslateBottom> declares the whole shared ITransitionProps surface and wires it through useCssTransition.
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | 'origam-transition--translate-bottom' | Transition class prefix. Change it only to swap in your own keyframes. |
disabled | boolean | undefined | Sets css: false on the underlying <transition>, so the enter / leave classes are never applied and the content mounts and unmounts instantly. |
group | boolean | undefined | Render a <transition-group> instead of a <transition> — needed when the slot holds a keyed list rather than a single element. |
origin | string | undefined | Written to transform-origin on the element in the beforeEnter hook. See the note below. |
hideOnLeave | boolean | undefined | display: none !important on the leaving element for the whole leave phase. |
leaveAbsolute | boolean | undefined | Freezes the leaving element's box (position: absolute at its measured top / left / width / height) so the remaining siblings don't reflow mid-transition. Restored in afterLeave. |
mode | TTransitionMode | undefined | ⛔ Declared but inert. See the note below. |
hideOnLeave, leaveAbsolute and origin each guard on their own prop inside the hook, and the hooks are bound unconditionally since #549 — before that they were bound only while the transition was disabled, so all three were dead in normal use.
Emits
None. ITransitionEmits is empty for every member of the family — these wrappers only wire the native Vue <transition> enter / leave hooks internally.
Slots
| Slot | Scope | Description |
|---|---|---|
default | — | The transitioned content. With group, a keyed list. |
Notes
- The transform offset is viewport-relative (
50vh), so the slot enters from off-screen regardless of its rendered position. - Pair with
<OrigamFade>if you also want a backdrop opacity ramp. originsets the property but this transition has nothing to anchor on.transform-originchanges where ascaleorrotatepivots; the enter / leave keyframes here onlytranslateY, which is origin-independent. It becomes visible only if your slotted content carries its own scale / rotate.- ⛔
modehas no effect on this component, measured on the rendered tree rather than inferred.useCssTransitiononly forwards it on thegrouppath (if (props.group) bind.mode = props.mode), and that is the one place it cannot work: Vue'sTransitionGroupdoes not declaremode('mode' in TransitionGroup.props === false), so it lands as an inert DOM attribute. On the default path the wrapper absorbsmodeas a declared prop, so it never falls through to<Transition>— which does declare it. Observed markup:<transition-stub name="origam-transition--translate-bottom" appear="false" persisted="false" css="true">withmode="out-in"passed in. Use<OrigamTransition>or a plain<transition mode="out-in">when you need enter / leave ordering. prefers-reduced-motion: reducecollapses both phases to0.01msthrough theds.ds-reduced-motionSCSS mixin.
Accessibility
Reduced motion is handled by the component itself — you do NOT need to pass disabled from a matchMedia listener. Every member of the family emits a @media (prefers-reduced-motion: reduce) block (shared ds-reduced-motion mixin, issue #494) that collapses the duration to 0.01ms.
That override wins over the CSS variables above, deliberately: it zeroes the PROPERTY, not the variable, so a theme or a per-instance duration cannot resurrect the motion for a user who asked for none. Verified in Chromium — setting a 9 s duration through the token under prefers-reduced-motion: reduce still measures 0.01ms.
disabled remains available for the unrelated case of skipping the transition on purpose.