You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to include just the partials that you are actually using in your app, copy the foundation-everything mixin
into a foundation-custom file, and import that mixin instead of the foundation-everything mixin. Then you can adjust
what is and isn't included by editing the foundation-custom file. Warning: you will need to manage your dependencies
and styles manually if going this route.
Javascript
To use Foundation's Javascript features add foundationJS to your Ember app's options.
To use only parts of Foundation's Javascript features add foundationJS to your
Ember app's options with an array of the elements to include. Remove the elements that
should not be included. Using this method will require managing the dependencies for each
component and making sure the appropriate util. files are included for the components
being included. Because Foundation since v6.2 has written the modules in ES6, they need
to be transpiled to ES5 (Ember does not transpile the vendors.js files).
All of the Foundation components which require Javascript have been turned into Ember components.
The vast majority of the Foundation Javascript options have been exposed as component parameters.
See the Zurb Foundation for Sites documentation for any specifics.
Any exceptions are documented below.
Each Foundation Javascript widget can be directly accessed through the zfUi property. For example,
the following would call the open method on the reveal component:
myRevealComponent.get('zfUi').open();
A full sample is available in tests/dummy/app/templates/application.hbs
{{#zf-accordion}}
<liclass="accordion-item is-active" data-accordion-item>
<aclass="accordion-title">Accordion 1</a>
<divclass="accordion-content" data-tab-content>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</div>
</li>
<liclass="accordion-item" data-accordion-item>
<aclass="accordion-title">Accordion 2</a>
<divclass="accordion-content" data-tab-content>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Esse aliquid, optio ab!
</div>
</li>
<liclass="accordion-item" data-accordion-item>
<aclass="accordion-title">Accordion 3</a>
<divclass="accordion-content" data-tab-content>
I would start in the open state, due to using the `is-active` state class.
</div>
</li>
{{/zf-accordion}}
Callout (With ember-cli-flash Integration)
This addon tends to avoid markup-only related components, this component is a special case.
This is a good way to easily provide a flash-message-style component to your Ember app.
NOTE: This addon will not work as expected, unless used within the ember-cli-flash!
This is designed to integrate with the ember-cli-flash addon
(which provides a foundation5 styling option)
<buttonclass="button"data-toggle="example-dropdown">Toggle Dropdown</button>
{{#zf-dropdownid="example-dropdown"}}
Example form in a dropdown.
<form>
<divclass="row">
<divclass="medium-6 columns">
<label>Name
<inputtype="text"placeholder="Kirk, James T.">
</label>
</div>
<divclass="medium-6 columns">
<label>Rank
<inputtype="text"placeholder="Captain">
</label>
</div>
</div>
</form>
{{/zf-dropdown}}
Magellan
Usage
{{#zf-magellan}}
<li><ahref="#reveal">Reveal</a></li>
<li><ahref="#accordion-menu">Accordion Menu</a></li>
<li><ahref="#accordion">Accordion</a></li>
{{/zf-magellan}}
<divclass="row"id="reveal">
<!-- Your content here -->
</div>
<divclass="row"id="accordion-menu">
<!-- Your content here -->
</div>
<divclass="row"id="accordion">
<!-- Your content here -->
</div>
Off-canvas
There are several additional options outside of the documented options on the Zurb Foundation
site.
Option
Description
showLeftOffCanvas
Show left off-canvas element
showRightOffCanvas
Show right off-canvas element
Accessing the zf widget directly is a bit different with the off-canvas component. In the case
of a single off canvas element (i.e. left or right ) the zfUi element can be accessed. However,
if both the showLeftOffCanvas and showRightOffCanvas flags are set, this is a bit problematic.
An array containing both of the elements can be accessed as the zfUiList member.
Usage. This illustrates both a left and right off-canvas widget.
{{#zf-off-canvasshowRightOffCanvas=trueas |section| }}{{#ifsection.isOffCanvasLeft}}
<p>Example left off canvas content</p>
{{elseif section.isOffCanvasRight}}
<p>Example right off canvas content</p>
{{else}}<!-- Main body goes here --><!-- Buttons to toggle off canvas -->
<buttonclass="button"data-toggle="zf-off-canvas-left">Toggle Off-canvas Left</button>
<buttonclass="button"data-toggle="zf-off-canvas-right">Toggle Off-canvas Right</button>
{{/if}}{{/zf-off-canvas}}
Orbit
The following options are not yet supported:
animInFromRight
animOutToRight
animInFromLeft
animOutToLeft
useMUI
Usage
{{#zf-orbitnav-buttons=true}}
<ulclass="orbit-container">
<buttonclass="orbit-previous"aria-label="previous"><spanclass="show-for-sr">Previous Slide</span>◀</button>
<buttonclass="orbit-next"aria-label="next"><spanclass="show-for-sr">Next Slide</span>▶</button>
<liclass="is-active orbit-slide">
<div>
<h3class="text-center">1: You can also throw some text in here!</h3>
<pclass="text-center">Achieve an animation-free Orbit with the data attribute data-use-m-u-i="false"</p>
<h3class="text-center">This Orbit slider does not use animations.</h3>
</div>
</li>
<liclass="orbit-slide">
<div>
<h3class="text-center">2: You can also throw some text in here!</h3>
<pclass="text-center">
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Unde harum rem, beatae ipsa consectetur quisquam. Rerum ratione, delectus atque
tempore sed, suscipit ullam, beatae distinctio cupiditate ipsam eligendi tempora
expedita.
</p>
<h3class="text-center">This Orbit slider does not use animations.</h3>
</div>
</li>
<liclass="orbit-slide">
<div>
<h3class="text-center">3: You can also throw some text in here!</h3>
<pclass="text-center">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde harum rem,
beatae ipsa consectetur quisquam. Rerum ratione, delectus atque tempore sed,
suscipit ullam, beatae distinctio cupiditate ipsam eligendi tempora expedita.
</p>
<h3class="text-center">This Orbit slider does not use animations.</h3>
</div>
</li>
<liclass="orbit-slide">
<div>
<h3class="text-center">4: You can also throw some text in here!</h3>
<pclass="text-center">
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Unde harum rem, beatae ipsa consectetur quisquam. Rerum ratione, delectus atque
tempore sed, suscipit ullam, beatae distinctio cupiditate ipsam eligendi tempora
expedita.
</p>
<h3class="text-center">This Orbit slider does not use animations.</h3>
</div>
</li>
</ul>
<navclass="orbit-bullets">
<buttonclass="is-active"data-slide="0"><spanclass="show-for-sr">First slide details.</span>
<spanclass="show-for-sr">Current Slide</span></button>
<buttondata-slide="1"><spanclass="show-for-sr">Second slide details.</span></button>
<buttondata-slide="2"><spanclass="show-for-sr">Third slide details.</span></button>
<buttondata-slide="3"><spanclass="show-for-sr">Fourth slide details.</span></button>
</nav>
{{/zf-orbit}}
Reveal
The following options are not yet supported:
animationIn
animationOut
Usage
<p><adata-open="exampleModal">Click me for a modal</a></p>
{{#zf-revealid="exampleModal"overlay=showDialogOverlay}}
<h1>Awesome. I Have It.</h1>
<pclass="lead">Your couch. It is mine.</p>
<p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p>
<buttonclass="close-button" data-close aria-label="Close reveal"type="button">
<spanaria-hidden="true">×</span>
</button>
{{/zf-reveal}}
<p>{{inputtype="checkbox"name="showDialogOverlay"checked=showDialogOverlay}} Show Overlay</p>
{{#zf-tabsid="example-tabs"}}
<liclass="tabs-title is-active"><ahref="#panel1"aria-selected="true">Tab 1</a></li>
<liclass="tabs-title"><ahref="#panel2">Tab 2</a></li>
{{/zf-tabs}}
<divclass="tabs-content"data-tabs-content="example-tabs">
<divclass="tabs-panel is-active"id="panel1">
<p>
Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus
ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est
bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus.
</p>
</div>
<divclass="tabs-panel"id="panel2">
<p>
Suspendisse dictum feugiat nisl ut dapibus. Vivamus hendrerit arcu sed erat molestie
vehicula. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis
nisl tempor. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor.
</p>
</div>
</div>
Tooltip
The template option has been renamed to zf-template as this causes a collision with an existing
Ember component member.
Usage
<p>
The {{#zf-tooltiptitle="Fancy word for a beetle."}}scarabaeus{{/zf-tooltip}} hung quite
clear of any branches, and, if allowed to fall, would have fallen at our feet. Legrand
immediately took the scythe, and cleared with it a circular space, three or four yards
in diameter, just beneath the insect, and, having accomplished this, ordered Jupiter to
let go the string and come down from the tree.
</p>
Work to do
Improve unit and integration tests
Improve documentation
Create an adapter so Liquid Fire can be used natively instead of Motion