UNPKG

@empathyco/x-components

Version:
45 lines (30 loc) 1.62 kB
--- title: FadeAndSlide --- # FadeAndSlide Renders a transition group wrapping the elements passed in the default slot and animating them with a fade and slide animation. ## Props | Name | Description | Type | Default | | ------------------- | ------------------------------------------------------------------------------ | -------------------- | ----------------- | | <code>tag</code> | HTML Element that the transition-group children will be wrapped in. | <code>string</code> | <code></code> | | <code>appear</code> | Indicates if the transition must be applied on the initial render of the node. | <code>boolean</code> | <code>true</code> | ## Slots | Name | Description | Bindings<br />(name - type - description) | | -------------------- | ----------------------------------- | ----------------------------------------- | | <code>default</code> | (Required) Transition-group content | None | ## Examples The FadeAndSlide component is intended to be used as a prop in animatable components but also works as a wrapper of a transition group that can receive the tag it will render to as a prop. Used as a prop in an animatable component: ```vue <AnimatableComponent :animation="FadeAndSlide" /> ``` Used as a regular component passing a the tag as prop: ```vue <FadeAndSlide tag="ul"> <li>Element to animate</li> <li>Element to animate</li> <li>Element to animate</li> </FadeAndSlide> ```