]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
docs: move Motion UI Toggler example to its own section
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 5 Aug 2018 21:59:28 +0000 (23:59 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 5 Aug 2018 22:08:14 +0000 (00:08 +0200)
docs/pages/motion-ui.md

index 2b37b9aadccc0567888aca81fff29706eeb28b8f..198a8302ea01639d009057a4be3ca7a4cf52d649 100644 (file)
@@ -6,29 +6,8 @@ library:
   docs: https://github.com/zurb/motion-ui/tree/master/docs
 ---
 
-Motion UI is a standalone library that powers the transition effects used in a number of Foundation components, including [Toggler](toggler.html), [Reveal](reveal.html), and [Orbit](orbit.html). The transitions are powered by special transition classes that the Motion UI Sass creates. For example, here are two instances of Toggler&mdash;one using fade classes (`.fade-in` and `.fade-out`), and one using slide classes (`.slide-in-down` and `.slide-out-up`).
+Motion UI is a standalone library that powers the transition effects used in a number of Foundation components, including [Toggler](toggler.html), [Reveal](reveal.html), and [Orbit](orbit.html).
 
-```html
-<div data-toggler data-animate="fade-in fade-out" class="callout secondary">
-  <p>This panel fades.</p>
-</div>
-
-<div data-toggler data-animate="slide-in-down slide-out-up" class="callout secondary">
-  <p>This panel slides.</p>
-</div>
-```
-
-<button type="button" class="button" data-toggle="motion-example-1">Fade</button><button type="button" class="button" data-toggle="motion-example-2">Slide</button>
-<div class="grid-x grid-margin-x">
-  <div class="cell small-6">
-    <div data-toggler data-animate="fade-in fade-out" class="callout secondary ease" id="motion-example-1">
-      <p>This panel <strong>fades</strong>.</p>
-    </div>
-  </div>
-  <div class="cell small-6">
-    <div data-toggler data-animate="slide-in-down slide-out-up" class="callout secondary ease" id="motion-example-2">
-      <p>This panel <strong>slides</strong>.</p>
-    </div>
   </div>
 </div>
 
@@ -78,6 +57,42 @@ Or, another way to start using Motion UI is through a CDN.
 
 ---
 
+## Usage in Components
+
+Various Foundation components provide options for to use Motion UI animations when changing state. Here are the options for each plugin that support Motion UI:
+- [Orbit](orbit.html): `data-animate`
+- [Reveal](reveal.html): `data-animation-in`, `data-animation-out`
+- [Toggler](toggler.html): `data-animate`
+- [Responsive Toggler](responsive-navigation.html): `data-animate`
+
+For example, here are two instances of Toggler&mdash;one using fade classes (`.fade-in` and `.fade-out`), and one using slide classes (`.slide-in-down` and `.slide-out-up`). See all availaible classes in [build-in transitions](#built-in-transitions) below.
+
+```html
+<div data-toggler data-animate="fade-in fade-out" class="callout secondary">
+  <p>This panel fades.</p>
+</div>
+
+<div data-toggler data-animate="slide-in-down slide-out-up" class="callout secondary">
+  <p>This panel slides.</p>
+</div>
+```
+
+<button type="button" class="button" data-toggle="motion-example-1">Fade</button><button type="button" class="button" data-toggle="motion-example-2">Slide</button>
+<div class="grid-x grid-margin-x">
+  <div class="cell small-6">
+    <div data-toggler data-animate="fade-in fade-out" class="callout secondary ease" id="motion-example-1">
+      <p>This panel <strong>fades</strong>.</p>
+    </div>
+  </div>
+  <div class="cell small-6">
+    <div data-toggler data-animate="slide-in-down slide-out-up" class="callout secondary ease" id="motion-example-2">
+      <p>This panel <strong>slides</strong>.</p>
+    </div>
+  </div>
+</div>
+
+---
+
 ## Built-in Transitions
 
 Motion UI includes more than two dozen built-in transition classes. They can be enabled by adding this line to your Sass file, after you've imported the library: