Skip to content

SlideTransition ​

Height transition for v-if / v-show

Wrap one element that appears and disappears — an expanding row, a detail panel, an inline message — and it slides open from 0 to its natural height and back, without a fixed max-height. For a disclosure with its own button, Collapsible already does this.

Basic
  • duration in ms (300 by default). Under reduced motion, or with duration 0, the element shows and hides at once.
  • The slot needs a single root element. Its padding stays visible at height 0, so put the padding on an inner wrapper to close fully.

Usage ​

ts
import { BlessSlideTransition } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
durationnumber300ms; 0 or reduced motion shows and hides at once
appearboolean—

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.