diff --git a/README.md b/README.md index 3819e20..3d5cfaa 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,77 @@ Your custom easing can then be used like so (make sure to convert easing name to `v-show-slide:400:example-easing` +### Events + +Events are fired on the same element the directive was defined on. Below are the available events: + +| Event | Description | +| ------------------ | ---------------------------------------------- | +| @slide-open-start | Fired when the element starts sliding open | +| @slide-open-end | Fired when the element finishes sliding open | +| @slide-close-start | Fired when the element starts sliding closed | +| @slide-close-end | Fired when the element finishes sliding closed | + +Example: + +```vue + + + +``` + ## Accessibility (A11y) This directive will prevent child elements of the sliding element from being focusable when closed. Other than that it does not handle any other aspects of a11y such as adding or removing of `aria` attributes. Check out the [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices/) for more information. The most basic setup is to use `aria-expanded` and `aria-controls` as shown in the above [example](#usage). diff --git a/src/components/Card.vue b/src/components/Card.vue index dff9556..de2fd5d 100644 --- a/src/components/Card.vue +++ b/src/components/Card.vue @@ -8,7 +8,15 @@

{{ description }}

-