2013-10-14 02:00:38 +04:00
---
layout: default
2014-02-10 03:54:54 +04:00
title: Components · Ratchet
2013-10-14 02:00:38 +04:00
---
2014-02-23 07:45:37 +04:00
< div class = "docs-sub-header" >
2014-02-24 05:49:40 +04:00
{% include masthead.html %}
2014-02-23 07:45:37 +04:00
< div class = "container" >
< div class = "column-group" >
< div class = "column units-2" >
< div class = "docs-sub-content" >
< h2 class = "page-title" > Components< / h2 >
< p class = "page-description" > Design patterns that serve as basic building blocks< / p >
< / div >
< / div >
2014-01-19 04:46:17 +04:00
< / div >
2014-02-24 09:48:52 +04:00
{% include ad.html %}
2014-01-12 01:47:41 +04:00
< / div >
2014-02-24 09:48:52 +04:00
{% include toolbar.html %}
2014-01-12 03:22:01 +04:00
< / div >
2013-10-25 18:33:44 +04:00
< div class = "container" >
<!-- Components -->
2014-01-12 06:10:26 +04:00
< div class = "docs-components column-group" >
2014-01-12 09:41:47 +04:00
< div class = "device-column column units-2 lg-units-5 pull-right" >
<!-- In phone examples -->
2014-02-17 09:12:54 +04:00
< div class = "device js-device" >
2014-01-12 09:41:47 +04:00
< div class = "device-content" >
2014-01-12 06:10:26 +04:00
< div id = "iwindow" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-01-12 06:10:26 +04:00
< h1 class = "title" > Title< / h1 >
< / header >
< / div >
< / div >
< / div >
< / div >
2013-11-11 05:50:22 +04:00
< div class = "column units-2 lg-units-7" >
2013-10-25 18:33:44 +04:00
<!-- Bars -->
< article class = "component active" id = "bars" >
< h3 class = "component-title" > Title bar< / h3 >
< p class = "component-description" > Title bars are full width and docked to the top of the viewport.< / p >
< div class = "component-example component-example-fullbleed" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2013-10-14 02:00:38 +04:00
< h1 class = "title" > Title< / h1 >
< / header >
< / div >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2013-10-14 02:00:38 +04:00
< h1 class = "title" > Title< / h1 >
< / header >
{% endhighlight %}
< / article >
< article class = "component" >
< h3 class = "component-title" > Title bar with buttons< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Buttons in a title bar are left or right aligned and should be used for actions. Use the < code > .pull-right< / code > or < code > .pull-right< / code > utility classes to float the buttons. Also, be sure to place any floated elements bofore the title.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-left" >
2013-10-14 02:00:38 +04:00
Left
< / a >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-right" >
2013-10-14 02:00:38 +04:00
Right
< / a >
2013-12-22 02:04:07 +04:00
< h1 class = "title" > Title< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
< / div >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-left" >
2013-10-14 02:00:38 +04:00
Left
< / a >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-right" >
2013-10-14 02:00:38 +04:00
Right
< / a >
2013-12-22 02:04:07 +04:00
< h1 class = "title" > Title< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
{% endhighlight %}
< / article >
2014-02-09 04:59:51 +04:00
< article class = "component" >
< h3 class = "component-title" > Title bar with icons< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Icons can also be used for actions in toolbars. Again, be sure to use utility classes to float the icons into position.< / p >
2014-02-09 04:59:51 +04:00
< div class = "component-example component-example-fullbleed" >
< header class = "bar bar-nav" >
2014-02-15 09:46:44 +04:00
< a class = "icon icon-left-nav pull-left" > < / a >
2014-02-15 10:53:14 +04:00
< a class = "icon icon-compose pull-right" > < / a >
2014-02-09 04:59:51 +04:00
< h1 class = "title" > Title< / h1 >
< / header >
< / div >
{% highlight html %}
< header class = "bar bar-nav" >
2014-02-15 09:46:44 +04:00
< a class = "icon icon-left-nav pull-left" > < / a >
2014-02-15 10:53:14 +04:00
< a class = "icon icon-compose pull-right" > < / a >
2014-02-09 04:59:51 +04:00
< h1 class = "title" > Title< / h1 >
< / header >
{% endhighlight %}
< / article >
2013-10-14 02:00:38 +04:00
< article class = "component" >
2014-02-02 02:36:05 +04:00
< h3 class = "component-title" > Title bar with link buttons and icons< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Link buttons can be used in tool bars to remove the outline. Use these in conjuction with icons to recreate the nav feel from iOS7. Note the use of < code > .btn-nav< / code > to bring the buttons a little bit closer to the edge of the viewport.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-17 00:03:23 +04:00
< a class = "btn btn-link btn-nav pull-left" >
2014-02-15 09:46:44 +04:00
< span class = "icon icon-left-nav" > < / span >
2014-02-09 04:59:51 +04:00
Left
< / a >
2014-02-17 00:03:23 +04:00
< a class = "btn btn-link btn-nav pull-right" >
2014-02-09 04:59:51 +04:00
Right
2014-02-15 11:02:04 +04:00
< span class = "icon icon-right-nav" > < / span >
2013-10-14 02:00:38 +04:00
< / a >
2013-12-22 02:04:07 +04:00
< h1 class = "title" > Title< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
< / div >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-17 00:03:23 +04:00
< a class = "btn btn-link btn-nav pull-left" >
2014-02-15 09:46:44 +04:00
< span class = "icon icon-left-nav" > < / span >
2014-02-09 04:59:51 +04:00
Left
< / a >
2014-02-17 00:03:23 +04:00
< a class = "btn btn-link btn-nav pull-right" >
2014-02-09 04:59:51 +04:00
Right
2014-02-15 09:46:44 +04:00
< span class = "icon icon-right-nav" > < / span >
2014-02-02 02:36:05 +04:00
< / a >
2013-12-22 02:04:07 +04:00
< h1 class = "title" > Title< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
{% endhighlight %}
< / article >
< article class = "component" >
2014-02-10 08:47:10 +04:00
< h3 class = "component-title" > Title bar with segmented control< / h3 >
< p class = "component-description" > Title bars can also house segmented controls. Feel free to add accompanying buttons too. The control will automatically layout itself out correctly.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-left" >
2013-10-14 02:00:38 +04:00
Left
< / a >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-right" >
2013-12-22 02:04:07 +04:00
Right
< / a >
2014-02-11 07:25:13 +04:00
< div class = "segmented-control" >
< a class = "control-item active" > One< / a >
< a class = "control-item" > Two< / a >
< a class = "control-item" > Three< / a >
< / div >
2013-10-14 02:00:38 +04:00
< / header >
< / div >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-left" >
2013-10-14 02:00:38 +04:00
Left
< / a >
2014-02-01 05:32:16 +04:00
< a class = "btn pull-right" >
2013-12-22 02:04:07 +04:00
Right
< / a >
2014-02-11 07:25:13 +04:00
< div class = "segmented-control" >
< a class = "control-item active" > One< / a >
< a class = "control-item" > Two< / a >
< a class = "control-item" > Three< / a >
< / div >
2013-10-14 02:00:38 +04:00
< / header >
{% endhighlight %}
< / article >
< article class = "component" >
< h3 class = "component-title" > Tab bar< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Use Ratchicons in the < code > .tab-bar< / code > to represent different sections of your app.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-01 06:09:36 +04:00
< nav class = "bar bar-tab" >
2014-02-01 06:02:18 +04:00
< a class = "tab-item active" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-home" > < / span >
2014-02-12 11:09:42 +04:00
< span class = "tab-label" > Label< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-person" > < / span >
2014-02-12 11:09:42 +04:00
< span class = "tab-label" > Label< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-star-filled" > < / span >
2014-02-12 11:09:42 +04:00
< span class = "tab-label" > Label< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-search" > < / span >
2014-02-12 11:09:42 +04:00
< span class = "tab-label" > Label< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-gear" > < / span >
2014-02-12 11:09:42 +04:00
< span class = "tab-label" > Label< / span >
2013-12-22 02:04:07 +04:00
< / a >
2013-10-14 02:00:38 +04:00
< / nav >
< / div >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< nav class = "bar bar-tab" >
2014-02-01 06:02:18 +04:00
< a class = "tab-item active" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-home" > < / span >
2014-02-15 10:28:06 +04:00
< span class = "tab-label" > Home< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-person" > < / span >
2014-02-15 10:28:06 +04:00
< span class = "tab-label" > Profile< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-star-filled" > < / span >
2014-02-15 10:28:06 +04:00
< span class = "tab-label" > Favorites< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-search" > < / span >
2014-02-15 10:28:06 +04:00
< span class = "tab-label" > Search< / span >
2013-12-22 02:04:07 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-15 10:21:21 +04:00
< span class = "icon icon-gear" > < / span >
2014-02-15 10:28:06 +04:00
< span class = "tab-label" > Settings< / span >
2013-12-22 02:04:07 +04:00
< / a >
2013-10-14 02:00:38 +04:00
< / nav >
{% endhighlight %}
< p class = "component-note touch-only" > < strong > Note:< / strong > Use push.js to actually change content.< / p >
< / article >
2014-02-12 10:32:00 +04:00
< article class = "component" >
< h3 class = "component-title" > Tab bar (labels only)< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > If you don't want to use icons, that's okay too. The text will appear larger to use the additional space.< / p >
2014-02-12 10:32:00 +04:00
< div class = "component-example component-example-fullbleed" >
< nav class = "bar bar-tab" >
< a class = "tab-item active" href = "#" >
2014-02-12 10:34:12 +04:00
Label
2014-02-12 10:32:00 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-12 10:34:12 +04:00
Label
2014-02-12 10:32:00 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-12 10:34:12 +04:00
Label
2014-02-12 10:32:00 +04:00
< / a >
< / nav >
< / div >
{% highlight html %}
< nav class = "bar bar-tab" >
< a class = "tab-item active" href = "#" >
2014-02-12 10:34:12 +04:00
Label
2014-02-12 10:32:00 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-12 10:34:12 +04:00
Label
2014-02-12 10:32:00 +04:00
< / a >
< a class = "tab-item" href = "#" >
2014-02-12 10:34:12 +04:00
Label
2014-02-12 10:32:00 +04:00
< / a >
< / nav >
{% endhighlight %}
< p class = "component-note touch-only" > < strong > Note:< / strong > Use push.js to actually change content.< / p >
< / article >
2013-10-14 02:00:38 +04:00
< article class = "component" >
< h3 class = "component-title" > Standard bars< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Standard bars are basic fixed elements that can be positioned in four places. These can be used to house buttons, icons, or segmented controls (see following examples).< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-10 08:47:10 +04:00
<!-- Segmented control in standard bar fixed to top -->
2014-02-01 06:09:36 +04:00
< nav class = "bar bar-standard" >
2014-02-11 07:25:13 +04:00
< div class = "segmented-control" >
< a class = "control-item active" > Thing one< / a >
< a class = "control-item" > Thing two< / a >
< a class = "control-item" > Thing three< / a >
< / div >
2013-10-14 02:00:38 +04:00
< / nav >
<!-- Block button in standard bar fixed below top bar -->
2014-02-01 06:09:36 +04:00
< div class = "bar bar-standard bar-header-secondary" >
2014-02-01 05:32:16 +04:00
< a class = "btn btn-block" > Block level button< / a >
2013-10-14 02:00:38 +04:00
< / div >
< / div >
{% highlight html %}
2014-02-10 08:50:34 +04:00
<!-- Segmented control in standard bar fixed to top -->
2014-02-01 06:09:36 +04:00
< nav class = "bar bar-standard" >
2014-02-11 07:25:13 +04:00
< div class = "segmented-control" >
< a class = "control-item active" > Thing one< / a >
< a class = "control-item" > Thing two< / a >
< a class = "control-item" > Thing three< / a >
< / div >
2013-10-14 02:00:38 +04:00
< / nav >
<!-- Block button in standard bar fixed below top bar -->
2014-02-01 06:09:36 +04:00
< div class = "bar bar-standard bar-header-secondary" >
2014-02-16 04:46:05 +04:00
< a class = "btn btn-block" > Block level button< / a >
2013-10-14 02:00:38 +04:00
< / div >
2014-02-24 11:06:08 +04:00
<!-- Block button in standard bar fixed above the footer -->
< div class = "bar bar-standard bar-footer-secondary" >
< a class = "btn btn-block" > Block level button< / a >
< / div >
<!-- Icons in standard bar fixed to the bottom of the screen -->
< div class = "bar bar-standard bar-footer" >
< a class = "icon icon-compose pull-left" > < / a >
< a class = "icon icon-gear pull-right" > < / a >
< / div >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
2014-02-02 03:41:33 +04:00
<!-- Typography -->
< article class = "component" id = "typography" >
< h3 class = "component-title" > Typography< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Use headings and paragraphs to title and describe sections of your app. Apply or wrap elements with < code > .content-padded< / code > to give the content space around the screen.< / p >
2014-02-02 03:41:33 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-24 11:06:08 +04:00
< div class = "content-padded" >
< h1 > h1. Heading< / h1 >
< h2 > h2. Heading< / h2 >
< h3 > h3. Heading< / h3 >
< h4 > h4. Heading< / h4 >
< h5 > h5. Heading< / h5 >
< h6 > h6. Heading< / h6 >
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco.< / p >
< / div >
2014-02-02 03:41:33 +04:00
< / div >
{% highlight html %}
2014-02-24 11:06:08 +04:00
< div class = "content-padded" >
< h1 > h1. Heading< / h1 >
< h2 > h2. Heading< / h2 >
< h3 > h3. Heading< / h3 >
< h4 > h4. Heading< / h4 >
< h5 > h5. Heading< / h5 >
< h6 > h6. Heading< / h6 >
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco.< / p >
< / div >
2014-02-02 03:41:33 +04:00
{% endhighlight %}
< / article >
2013-10-14 02:00:38 +04:00
<!-- Table views -->
< article class = "component" id = "table-views" >
< h3 class = "component-title" > Table views< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Table views can be used for organizing data, showing collections of links, or a series of controls.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" > Item 1< / li >
< li class = "table-view-cell" > Item 2< / li >
< li class = "table-view-cell table-view-divider" > Divider< / li >
< li class = "table-view-cell" > Item 3< / li >
2013-10-14 02:00:38 +04:00
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" > Item 1< / li >
< li class = "table-view-cell table-view-cell" > Item 2< / li >
2013-10-14 02:00:38 +04:00
< li class = "table-view-divider" > Divider< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" > Item 3< / li >
2013-10-14 02:00:38 +04:00
< / ul >
{% endhighlight %}
< / article >
< article class = "component" >
< h3 class = "component-title" > Table view with chevrons< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Chevrons should be used to indicate that the item is linked. Just apply the classes < code > .push-right< / code > or < code > .push-left< / code > to use a chevron.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
2013-10-24 18:54:57 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
2013-10-14 02:00:38 +04:00
Item 1
< / a >
< / li >
2013-10-24 18:54:57 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
2013-10-14 02:00:38 +04:00
Item 2
< / a >
< / li >
2013-10-24 18:54:57 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
2013-10-14 02:00:38 +04:00
Item 3
< / a >
< / li >
< / ul >
< / div >
{% highlight html %}
2013-10-25 18:33:44 +04:00
< ul class = "table-view" >
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
2013-10-14 02:00:38 +04:00
Item 1
< / a >
< / li >
2013-10-25 18:33:44 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
2013-10-14 02:00:38 +04:00
Item 2
< / a >
< / li >
2013-10-25 18:33:44 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
2013-10-14 02:00:38 +04:00
Item 3
< / a >
< / li >
< / ul >
{% endhighlight %}
< / article >
< article class = "component" >
2013-10-20 00:19:00 +04:00
< h3 class = "component-title" > Table view with badges< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Badges are a great way of showing data.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
2014-02-10 07:22:27 +04:00
< li class = "table-view-cell" > Item 1 < span class = "badge" > 4< / span > < / li >
< li class = "table-view-cell" > Item 2 < span class = "badge" > 1< / span > < / li >
< li class = "table-view-cell" > Item 3 < span class = "badge" > 5< / span > < / li >
2013-10-14 02:00:38 +04:00
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
2014-02-10 07:22:27 +04:00
< li class = "table-view-cell" > Item 1 < span class = "badge" > 4< / span > < / li >
< li class = "table-view-cell" > Item 2 < span class = "badge" > 1< / span > < / li >
< li class = "table-view-cell" > Item 3 < span class = "badge" > 5< / span > < / li >
2013-10-14 02:00:38 +04:00
< / ul >
{% endhighlight %}
< / article >
< article class = "component" >
2013-10-20 00:19:00 +04:00
< h3 class = "component-title" > Table view with badges and chevrons< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Feel free to use chevrons and badges together. They'll automatically positon themselves correctly.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
< span class = "badge" > 5< / span >
2013-10-14 02:00:38 +04:00
Item 1
< / a >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
< span class = "badge" > 5< / span >
2013-10-14 02:00:38 +04:00
Item 2
< / a >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
< span class = "badge" > 5< / span >
2013-10-14 02:00:38 +04:00
Item 3
< / a >
< / li >
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
< span class = "badge" > 5< / span >
2013-10-14 02:00:38 +04:00
Item 1
< / a >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
< span class = "badge" > 5< / span >
2013-10-14 02:00:38 +04:00
Item 2
< / a >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2014-02-10 07:22:27 +04:00
< a class = "push-right" >
< span class = "badge" > 5< / span >
2013-10-14 02:00:38 +04:00
Item 3
< / a >
< / li >
< / ul >
{% endhighlight %}
< / article >
2014-02-10 05:06:29 +04:00
< article class = "component" >
2014-02-12 09:11:19 +04:00
< h3 class = "component-title" > Table view with media (images)< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Showing media inside table views is easy. This component to perfect for images and text.< / p >
2014-02-10 05:06:29 +04:00
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
< li class = "table-view-cell media" >
2014-02-10 07:27:43 +04:00
< a class = "push-right" >
2014-02-10 05:06:29 +04:00
< img class = "media-object pull-left" src = "http://placehold.it/42x42" >
< div class = "media-body" >
Item 1
2014-02-12 09:11:19 +04:00
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.< / p >
2014-02-10 05:06:29 +04:00
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
2014-02-10 07:27:43 +04:00
< a class = "push-right" >
2014-02-10 05:06:29 +04:00
< img class = "media-object pull-left" src = "http://placehold.it/42x42" >
< div class = "media-body" >
Item 1
2014-02-12 09:11:19 +04:00
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.< / p >
2014-02-10 05:06:29 +04:00
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
2014-02-10 07:27:43 +04:00
< a class = "push-right" >
2014-02-10 05:06:29 +04:00
< img class = "media-object pull-left" src = "http://placehold.it/42x42" >
< div class = "media-body" >
Item 1
2014-02-12 09:11:19 +04:00
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.< / p >
2014-02-10 05:06:29 +04:00
< / div >
< / a >
< / li >
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
< li class = "table-view-cell media" >
2014-02-10 07:27:43 +04:00
< a class = "push-right" >
2014-02-10 05:06:29 +04:00
< img class = "media-object pull-left" src = "http://placehold.it/42x42" >
< div class = "media-body" >
Item 1
2014-02-12 09:11:19 +04:00
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.< / p >
2014-02-10 05:06:29 +04:00
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
2014-02-10 07:27:43 +04:00
< a class = "push-right" >
2014-02-10 05:06:29 +04:00
< img class = "media-object pull-left" src = "http://placehold.it/42x42" >
< div class = "media-body" >
Item 1
2014-02-12 09:11:19 +04:00
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.< / p >
2014-02-10 05:06:29 +04:00
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
2014-02-10 07:27:43 +04:00
< a class = "push-right" >
2014-02-10 05:06:29 +04:00
< img class = "media-object pull-left" src = "http://placehold.it/42x42" >
< div class = "media-body" >
Item 1
2014-02-12 09:11:19 +04:00
< p > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Lorem ipsum dolor sit amet.< / p >
< / div >
< / a >
< / li >
< / ul >
{% endhighlight %}
< / article >
< article class = "component" >
< h3 class = "component-title" > Table view with media (icons)< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Ratchicons can also used instead of images.< / p >
2014-02-12 09:11:19 +04:00
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
< li class = "table-view-cell media" >
< a class = "push-right" >
2014-02-15 10:33:46 +04:00
< span class = "media-object pull-left icon icon-trash" > < / span >
2014-02-12 09:11:19 +04:00
< div class = "media-body" >
Item 1
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
< a class = "push-right" >
2014-02-15 10:21:21 +04:00
< span class = "media-object pull-left icon icon-gear" > < / span >
2014-02-12 09:11:19 +04:00
< div class = "media-body" >
Item 2
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
< a class = "push-right" >
< span class = "media-object pull-left icon icon-pages" > < / span >
< div class = "media-body" >
Item 3
< / div >
< / a >
< / li >
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
< li class = "table-view-cell media" >
< a class = "push-right" >
2014-02-15 10:33:46 +04:00
< span class = "media-object pull-left icon icon-trash" > < / span >
2014-02-12 09:11:19 +04:00
< div class = "media-body" >
Item 1
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
< a class = "push-right" >
2014-02-15 10:21:21 +04:00
< span class = "media-object pull-left icon icon-gear" > < / span >
2014-02-12 09:11:19 +04:00
< div class = "media-body" >
Item 2
< / div >
< / a >
< / li >
< li class = "table-view-cell media" >
< a class = "push-right" >
< span class = "media-object pull-left icon icon-pages" > < / span >
< div class = "media-body" >
Item 3
2014-02-10 05:06:29 +04:00
< / div >
< / a >
< / li >
< / ul >
{% endhighlight %}
< / article >
2013-10-14 02:00:38 +04:00
< article class = "component" >
< h3 class = "component-title" > Table view with buttons< / h3 >
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
2014-02-10 07:22:27 +04:00
< li class = "table-view-cell" > Item 1 < a class = "btn" > Button< / a > < / li >
< li class = "table-view-cell" > Item 2 < a class = "btn btn-primary" > Button< / a > < / li >
< li class = "table-view-cell" > Item 3 < a class = "btn btn-positive" > Button< / a > < / li >
< li class = "table-view-cell" > Item 4 < a class = "btn btn-negative" > Button< / a > < / li >
2013-10-14 02:00:38 +04:00
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
2014-02-10 07:22:27 +04:00
< li class = "table-view-cell" > Item 1 < a class = "btn" > Button< / a > < / li >
< li class = "table-view-cell" > Item 2 < a class = "btn btn-primary" > Button< / a > < / li >
< li class = "table-view-cell" > Item 3 < a class = "btn btn-positive" > Button< / a > < / li >
< li class = "table-view-cell" > Item 4 < a class = "btn btn-negative" > Button< / a > < / li >
2013-10-14 02:00:38 +04:00
< / ul >
{% endhighlight %}
< / article >
< article class = "component" >
< h3 class = "component-title" > Table view with toggles< / h3 >
< div class = "component-example component-example-fullbleed" >
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2013-10-14 02:00:38 +04:00
Item 1
2014-02-10 07:22:27 +04:00
< div class = "toggle" >
2013-10-14 02:00:38 +04:00
< div class = "toggle-handle" > < / div >
< / div >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2013-10-14 02:00:38 +04:00
Item 2
2014-02-10 07:22:27 +04:00
< div class = "toggle active" >
2013-10-14 02:00:38 +04:00
< div class = "toggle-handle" > < / div >
< / div >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2013-10-14 02:00:38 +04:00
Item 3
2014-02-10 07:22:27 +04:00
< div class = "toggle" >
2013-10-14 02:00:38 +04:00
< div class = "toggle-handle" > < / div >
< / div >
< / li >
< / ul >
< / div >
{% highlight html %}
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2013-10-14 02:00:38 +04:00
Item 1
2014-02-10 07:22:27 +04:00
< div class = "toggle" >
2013-10-14 02:00:38 +04:00
< div class = "toggle-handle" > < / div >
< / div >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2013-10-14 02:00:38 +04:00
Item 2
2014-02-10 07:22:27 +04:00
< div class = "toggle active" >
2013-10-14 02:00:38 +04:00
< div class = "toggle-handle" > < / div >
< / div >
< / li >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" >
2013-10-14 02:00:38 +04:00
Item 3
2014-02-10 07:22:27 +04:00
< div class = "toggle" >
2013-10-14 02:00:38 +04:00
< div class = "toggle-handle" > < / div >
< / div >
< / li >
< / ul >
{% endhighlight %}
< / article >
< article class = "component" >
2013-12-22 02:04:07 +04:00
< h3 class = "component-title" > Carded table views< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Use < code > .card< / code > to wrap any content in a padded element.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example" >
2013-12-22 02:04:07 +04:00
< div class = "card" >
< ul class = "table-view" >
< li class = "table-view-cell" > Item 1< / li >
< li class = "table-view-cell" > Item 2< / li >
< li class = "table-view-cell table-view-divider" > Divider< / li >
< li class = "table-view-cell" > Item 3< / li >
< li class = "table-view-cell" > Item 4< / li >
< / ul >
< / div >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2013-12-22 02:04:07 +04:00
< div class = "card" >
< ul class = "table-view" >
< li class = "table-view-cell" > Item 1< / li >
< li class = "table-view-cell" > Item 2< / li >
< li class = "table-view-cell table-view-divider" > Divider< / li >
< li class = "table-view-cell" > Item 3< / li >
< li class = "table-view-cell" > Item 4< / li >
< / ul >
< / div >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
<!-- Buttons -->
< article class = "component" id = "buttons" >
< h3 class = "component-title" > Buttons< / h3 >
2014-02-02 02:25:13 +04:00
< p class = "component-description" > Buttons come in many flavors and should be used for user actions.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example" >
2014-02-01 05:32:16 +04:00
< a class = "btn" > Button< / a >
< a class = "btn btn-primary" > Button< / a >
< a class = "btn btn-positive" > Button< / a >
< a class = "btn btn-negative" > Button< / a >
< a class = "btn btn-link" > Button< / a >
2014-02-25 06:38:52 +04:00
< a class = "btn btn-outlined" > Button< / a >
< a class = "btn btn-primary btn-outlined" > Button< / a >
< a class = "btn btn-positive btn-outlined" > Button< / a >
< a class = "btn btn-negative btn-outlined" > Button< / a >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2014-02-01 05:32:16 +04:00
< a class = "btn" > Button< / a >
< a class = "btn btn-primary" > Button< / a >
< a class = "btn btn-positive" > Button< / a >
< a class = "btn btn-negative" > Button< / a >
< a class = "btn btn-link" > Button< / a >
2014-02-25 06:38:52 +04:00
< a class = "btn btn-outlined" > Button< / a >
< a class = "btn btn-primary btn-outlined" > Button< / a >
< a class = "btn btn-positive btn-outlined" > Button< / a >
< a class = "btn btn-negative btn-outlined" > Button< / a >
{% endhighlight %}
< / article >
<!-- Buttons -->
< article class = "component" id = "buttons" >
< h3 class = "component-title" > Buttons with icons< / h3 >
< p class = "component-description" > Ratchicons work inside buttons too.< / p >
< div class = "component-example" >
< a class = "btn" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-primary" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-positive" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-negative" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-link" >
< span class = "icon icon-left" > < / span >
Button
< / a >
< / div >
{% highlight html %}
2014-02-02 02:25:13 +04:00
< a class = "btn" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-primary" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-positive" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-negative" >
< span class = "icon icon-search" > < / span >
Button
< / a >
< a class = "btn btn-link" >
< span class = "icon icon-left" > < / span >
Button
< / a >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
2014-01-29 09:34:49 +04:00
< article class = "component" id = "buttonsBadges" >
2013-10-20 00:19:00 +04:00
< h3 class = "component-title" > Buttons with badges< / h3 >
2013-10-14 02:00:38 +04:00
< div class = "component-example" >
2014-02-01 05:32:16 +04:00
< a class = "btn" > Badge button < span class = "badge" > 1< / span > < / a >
2014-02-01 05:48:48 +04:00
< a class = "btn btn-primary" > Badge button < span class = "badge badge-primary" > 1< / span > < / a >
< a class = "btn btn-positive" > Badge button < span class = "badge badge-positive" > 1< / span > < / a >
< a class = "btn btn-negative" > Badge button < span class = "badge badge-negative" > 1< / span > < / a >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2014-02-01 05:32:16 +04:00
< a class = "btn" > Badge button < span class = "badge" > 1< / span > < / a >
2014-02-01 05:48:48 +04:00
< a class = "btn btn-primary" > Badge button < span class = "badge badge-primary" > 1< / span > < / a >
< a class = "btn btn-positive" > Badge button < span class = "badge badge-positive" > 1< / span > < / a >
< a class = "btn btn-negative" > Badge button < span class = "badge badge-negative" > 1< / span > < / a >
2014-02-01 05:32:16 +04:00
< a class = "btn btn-outlined" > Badge button < span class = "badge badge-inverted" > 1< / span > < / a >
2014-02-01 23:49:06 +04:00
< a class = "btn btn-outlined btn-primary" > Badge button < span class = "badge badge-primary badge-inverted" > 1< / span > < / a >
< a class = "btn btn-outlined btn-positive" > Badge button < span class = "badge badge-positive badge-inverted" > 1< / span > < / a >
< a class = "btn btn-outlined btn-negative" > Badge button < span class = "badge badge-negative badge-inverted" > 1< / span > < / a >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
< article class = "component" id = "blockButtons" >
< h3 class = "component-title" > Block buttons< / h3 >
< div class = "component-example" >
2014-02-01 05:32:16 +04:00
< a class = "btn btn-block" > Block button< / a >
< a class = "btn btn-primary btn-block" > Block button< / a >
< a class = "btn btn-positive btn-block" > Block button< / a >
< a class = "btn btn-negative btn-block" > Block button< / a >
< a class = "btn btn-block btn-outlined" > Block button< / a >
< a class = "btn btn-primary btn-block btn-outlined" > Block button< / a >
< a class = "btn btn-positive btn-block btn-outlined" > Block button< / a >
< a class = "btn btn-negative btn-block btn-outlined" > Block button< / a >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2014-02-01 05:32:16 +04:00
< a class = "btn btn-block" > Block button< / a >
< a class = "btn btn-primary btn-block" > Block button< / a >
< a class = "btn btn-positive btn-block" > Block button< / a >
< a class = "btn btn-negative btn-block" > Block button< / a >
< a class = "btn btn-block btn-outlined" > Block button< / a >
< a class = "btn btn-primary btn-block btn-outlined" > Block button< / a >
< a class = "btn btn-positive btn-block btn-outlined" > Block button< / a >
< a class = "btn btn-negative btn-block btn-outlined" > Block button< / a >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
2014-02-10 08:47:10 +04:00
<!-- Segmented Control -->
2014-02-10 08:50:34 +04:00
< article class = "component" id = "segmentedControls" >
2014-02-01 05:57:47 +04:00
< h3 class = "component-title" > Segmented control< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Content sections that are to be swapped in and out by the controller should all be siblings and have the class < code > .control-content< / code > . Then, just give each content section an id and point the link in the segmented control to that id.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example" >
2014-02-11 07:25:13 +04:00
< div class = "segmented-control" >
< a class = "control-item active" href = "#item1mobile" >
Thing one
< / a >
< a class = "control-item" href = "#item2mobile" >
Thing two
< / a >
< a class = "control-item" href = "#item3mobile" >
Thing three
< / a >
< / div >
2013-12-22 02:04:07 +04:00
< div class = "card" >
2014-02-11 07:25:13 +04:00
< span id = "item1mobile" class = "control-content active" > Item 1< / span >
< span id = "item2mobile" class = "control-content" > Item 2< / span >
< span id = "item3mobile" class = "control-content" > Item 3< / span >
2013-12-22 02:04:07 +04:00
< / div >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2014-02-11 07:25:13 +04:00
< div class = "segmented-control" >
< a class = "control-item active" href = "#item1mobile" >
Thing one
< / a >
< a class = "control-item" href = "#item2mobile" >
Thing two
< / a >
< a class = "control-item" href = "#item3mobile" >
Thing three
< / a >
2014-01-19 09:09:10 +04:00
< / div >
2014-02-11 07:25:13 +04:00
< div class = "card" >
< span id = "item1mobile" class = "control-content active" > Item 1< / span >
< span id = "item2mobile" class = "control-content" > Item 2< / span >
< span id = "item3mobile" class = "control-content" > Item 3< / span >
2013-12-22 02:04:07 +04:00
< / div >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
2013-10-20 00:19:00 +04:00
<!-- Badges -->
< article class = "component" id = "badges" >
< h3 class = "component-title" > Badges< / h3 >
2014-02-24 11:06:08 +04:00
< p class = "component-description" > Badges come in four flavors and should be used to indicate "how many" of something there are. Adding the a class of < code > .badge-inverted< / code > will remove the badges background color.< / p >
2013-10-14 02:00:38 +04:00
< div class = "component-example" >
2013-10-20 00:19:00 +04:00
< span class = "badge" > 1< / span >
2014-02-01 05:48:48 +04:00
< span class = "badge badge-primary" > 2< / span >
< span class = "badge badge-positive" > 3< / span >
< span class = "badge badge-negative" > 4< / span >
2013-12-22 02:08:36 +04:00
< span class = "badge badge-inverted" > 1< / span >
2014-02-01 05:48:48 +04:00
< span class = "badge badge-primary badge-inverted" > 2< / span >
< span class = "badge badge-positive badge-inverted" > 3< / span >
< span class = "badge badge-negative badge-inverted" > 4< / span >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2013-10-20 00:19:00 +04:00
< span class = "badge" > 1< / span >
2014-02-01 05:48:48 +04:00
< span class = "badge badge-primary" > 2< / span >
< span class = "badge badge-positive" > 3< / span >
< span class = "badge badge-negative" > 4< / span >
2013-10-20 00:19:00 +04:00
2013-12-22 02:08:36 +04:00
< span class = "badge badge-inverted" > 1< / span >
2014-02-01 05:48:48 +04:00
< span class = "badge badge-primary badge-inverted" > 2< / span >
< span class = "badge badge-positive badge-inverted" > 3< / span >
< span class = "badge badge-negative badge-inverted" > 4< / span >
2013-10-14 02:00:38 +04:00
{% endhighlight %}
< / article >
<!-- Forms -->
< article class = "component" id = "forms" >
< h3 class = "component-title" > Forms< / h3 >
< div class = "component-example" >
< form >
< input type = "text" placeholder = "Full name" >
< input type = "search" placeholder = "Search" >
< textarea rows = "5" > < / textarea >
2014-02-01 05:32:16 +04:00
< a class = "btn btn-positive btn-block" > Choose existing< / a >
2013-10-14 02:00:38 +04:00
< / form >
< / div >
{% highlight html %}
< form >
< input type = "text" placeholder = "Full name" >
< input type = "search" placeholder = "Search" >
< textarea rows = "5" > < / textarea >
2014-02-01 05:32:16 +04:00
< a class = "btn btn-positive btn-block" > Choose existing< / a >
2013-10-14 02:00:38 +04:00
< / form >
{% endhighlight %}
< / article >
<!-- Form with input group -->
< article class = "component" id = "formsWithInputGroup" >
< h3 class = "component-title" > Form with input group< / h3 >
2013-10-26 16:38:03 +04:00
< div class = "component-example component-example-fullbleed" >
2013-10-14 02:00:38 +04:00
< form class = "input-group" >
< input type = "text" placeholder = "Full name" >
< input type = "email" placeholder = "Email" >
< input type = "text" placeholder = "Username" >
< / form >
< / div >
{% highlight html %}
< form class = "input-group" >
< input type = "text" placeholder = "Full name" >
< input type = "email" placeholder = "Email" >
< input type = "text" placeholder = "Username" >
< / form >
{% endhighlight %}
< / article >
<!-- Form with input group and labels -->
< article class = "component" id = "formsWithInputGroupAndLabels" >
< h3 class = "component-title" > Form with input group and labels< / h3 >
2013-10-26 16:38:03 +04:00
< div class = "component-example component-example-fullbleed" >
2013-10-14 02:00:38 +04:00
< form class = "input-group" >
< div class = "input-row" >
< label > Full name< / label >
< input type = "text" placeholder = "Mister Ratchet" >
< / div >
< div class = "input-row" >
< label > Email< / label >
< input type = "email" placeholder = "ratchetframework@gmail.com" >
< / div >
< div class = "input-row" >
< label > Username< / label >
< input type = "text" placeholder = "goRatchet" >
< / div >
< / form >
< / div >
{% highlight html %}
< form class = "input-group" >
< div class = "input-row" >
< label > Full name< / label >
< input type = "text" placeholder = "Mister Ratchet" >
< / div >
< div class = "input-row" >
< label > Email< / label >
< input type = "email" placeholder = "ratchetframework@gmail.com" >
< / div >
< div class = "input-row" >
< label > Username< / label >
< input type = "text" placeholder = "goRatchet" >
< / div >
< / form >
{% endhighlight %}
< / article >
<!-- Toggle -->
< article class = "component" id = "toggles" >
< h3 class = "component-title" > Toggles< / h3 >
< p class = "component-description" > Toggles can be used by sliding or tapping the control.< / p >
< div class = "component-example" >
< div class = "toggle active" >
< div class = "toggle-handle" > < / div >
< / div >
< / div >
{% highlight html %}
< div class = "toggle active" >
< div class = "toggle-handle" > < / div >
< / div >
< div class = "toggle" >
< div class = "toggle-handle" > < / div >
< / div >
{% endhighlight %}
< p class = "component-description" > Toggles.js binds an event to the document that returns a detail object and can be used to fire a callback.< / p >
{% highlight js %}
// Only needed if you want to fire a callback
document
.querySelector('#myToggle')
.addEventListener('toggle', myFunction)
{% endhighlight %}
< / article >
<!-- Popovers -->
< article class = "component" id = "popovers" >
< h3 class = "component-title" > Popovers< / h3 >
{% highlight html %}
< div id = "popover" class = "popover" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-15 10:43:35 +04:00
< h1 class = "title" > Popover title< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
< ul class = "table-view" >
2013-10-20 04:49:15 +04:00
< li class = "table-view-cell" > Item1< / li >
< li class = "table-view-cell" > Item2< / li >
< li class = "table-view-cell" > Item3< / li >
< li class = "table-view-cell" > Item4< / li >
< li class = "table-view-cell" > Item5< / li >
< li class = "table-view-cell" > Item6< / li >
< li class = "table-view-cell" > Item7< / li >
< li class = "table-view-cell" > Item8< / li >
2013-10-14 02:00:38 +04:00
< / ul >
< / div >
{% endhighlight %}
< p class = "component-description" > Popovers are designed to only fire from < a href = "#bars" > title bars< / a > . Set the value of the title href to the id of a popover, like so:< / p >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2013-10-14 02:00:38 +04:00
< a href = "#myPopover" >
2014-02-15 10:43:35 +04:00
< h1 class = "title" >
Tap title
< span class = "icon icon-caret" > < / span >
< / h1 >
2013-10-14 02:00:38 +04:00
< / a >
< / header >
{% endhighlight %}
< / article >
<!-- Modals -->
< article class = "component" id = "modals" >
< h3 class = "component-title" > Modals< / h3 >
< div class = "component-example" >
2014-02-01 05:32:16 +04:00
< a href = "#myModalexample" class = "btn" > Open modal< / a >
2013-10-14 02:00:38 +04:00
< div id = "myModalexample" class = "modal" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-15 10:43:35 +04:00
< a class = "icon icon-close pull-right" href = "#myModalexample" > < / a >
2014-02-24 13:01:47 +04:00
< h1 class = "title" > Modal mobile< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
2014-02-24 13:01:47 +04:00
< p class = "content-padded" > The contents of my modal go here. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.< / p >
2013-10-14 02:00:38 +04:00
< / div >
< / div >
{% highlight html %}
2014-02-01 05:32:16 +04:00
< a href = "#myModalexample" class = "btn" > Open modal< / a >
2013-10-14 02:00:38 +04:00
< div id = "myModalexample" class = "modal" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2014-02-15 10:43:35 +04:00
< a class = "icon icon-close pull-right" href = "#myModalexample" > < / a >
2014-01-21 01:06:37 +04:00
< h1 class = "title" > Modal< / h1 >
2013-10-14 02:00:38 +04:00
< / header >
2014-01-19 09:09:10 +04:00
< div class = "content" >
2014-02-24 11:06:08 +04:00
< p class = "content-padded" > The contents of my modal go here. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.< / p >
2013-10-14 02:00:38 +04:00
< / div >
< / div >
{% endhighlight %}
< p class = "component-description" > Modals are designed to only fire from links. Set the value of the toggle links href to the id of a modal.< / p >
< / article >
2013-10-25 18:33:44 +04:00
<!-- Slider -->
< article class = "component" id = "sliders" >
< h3 class = "component-title" > Sliders< / h3 >
< p class = "component-description" > Can be used with any number of slides with any type of content.< / p >
2013-10-14 02:00:38 +04:00
2013-10-25 18:33:44 +04:00
< div class = "component-example component-example-fullbleed" >
< div class = "slider" id = "mySlider" >
2014-02-10 03:07:40 +04:00
< div class = "slide-group" >
2014-02-09 14:50:30 +04:00
< div class = "slide" >
2014-02-25 07:38:53 +04:00
< img src = "../assets/img/slide-1.png" >
2014-02-12 23:02:34 +04:00
< span class = "slide-text" >
2014-02-15 09:46:44 +04:00
< span class = "icon icon-left-nav" > < / span >
2014-02-12 23:02:34 +04:00
Slide me
< / span >
2014-02-09 14:50:30 +04:00
< / div >
< div class = "slide" >
2014-02-25 07:38:53 +04:00
< img src = "../assets/img/slide-2.png" >
2014-02-09 14:50:30 +04:00
< / div >
< div class = "slide" >
2014-02-25 07:38:53 +04:00
< img src = "../assets/img/slide-3.png" >
2014-02-09 14:50:30 +04:00
< / div >
< / div >
2013-10-25 18:33:44 +04:00
< / div >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
< div class = "slider" id = "mySlider" >
2014-02-10 03:07:40 +04:00
< div class = "slide-group" >
2014-02-09 14:50:30 +04:00
< div class = "slide" >
2014-02-25 07:38:53 +04:00
< img src = "../assets/img/slide-1.png" >
2014-02-12 23:02:34 +04:00
< span class = "slide-text" >
2014-02-15 09:46:44 +04:00
< span class = "icon icon-left-nav" > < / span >
2014-02-12 23:02:34 +04:00
Slide me
< / span >
2014-02-09 14:50:30 +04:00
< / div >
< div class = "slide" >
2014-02-25 07:38:53 +04:00
< img src = "../assets/img/slide-2.png" >
2014-02-09 14:50:30 +04:00
< / div >
< div class = "slide" >
2014-02-25 07:38:53 +04:00
< img src = "../assets/img/slide-3.png" >
2014-02-09 14:50:30 +04:00
< / div >
< / div >
2013-10-14 02:00:38 +04:00
< / div >
{% endhighlight %}
2013-10-25 18:33:44 +04:00
< p class = "component-description" > Sliders.js binds an event to the document that returns a detail object and can be used to fire a callback.< / p >
2013-10-14 02:00:38 +04:00
{% highlight js %}
// Only needed if you want to fire a callback
document
.querySelector('#mySlider')
.addEventListener('slide', myFunction)
{% endhighlight %}
2013-10-25 18:33:44 +04:00
< / article >
2013-10-14 02:00:38 +04:00
2013-10-25 18:33:44 +04:00
<!-- Push docs -->
< article class = "component" id = "push" >
2014-01-29 22:49:49 +04:00
< h3 class = "component-title" > Push< / h3 >
< p class = "component-description" > Push.js is the engine that connects Ratchet pages together with AJAX and the history api. Push.js is listening to all clicks on a page, so just make sure it's included and link something in your Ratchet project up.< / p >
2013-10-14 02:00:38 +04:00
2014-01-29 22:49:49 +04:00
{% highlight html %}
<!-- A one.html link -->
< a href = "two.html" > Two< / a >
{% endhighlight %}
2013-10-14 02:00:38 +04:00
2014-01-29 22:49:49 +04:00
< p class = "component-note" > This will use push to replace everything in the .content div with the .content of two.html. Also, it will either update or remove .bar-nav and .bar-tab according to their presences in two.html.< / p >
2013-10-14 02:00:38 +04:00
2014-01-29 22:49:49 +04:00
< p class = "component-description" > Now that pages are being loaded through push, it's easy to specify transitions for animations between pages. There are three different transitions to chose from: < code > fade< / code > , < code > slide-in< / code > , or < code > slide-out< / code > .< / p >
2013-10-14 02:00:38 +04:00
2014-01-29 22:49:49 +04:00
{% highlight html %}
<!-- An one.html link that animates to two.html -->
< a href = "two.html" data-transition = "fade" > Two< / a >
{% endhighlight %}
2013-10-14 02:00:38 +04:00
2014-01-29 22:49:49 +04:00
< p class = "component-description" > A working version of push:< / p >
2013-10-14 02:00:38 +04:00
2013-10-25 18:33:44 +04:00
< div class = "component-example component-example-fullbleed" >
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2013-10-25 18:33:44 +04:00
< h1 class = "title" > Push< / h1 >
< / header >
< div class = "content" >
2013-12-22 02:48:48 +04:00
< div class = "card" >
< ul class = "table-view" >
< li class = "table-view-cell" >
2014-02-17 00:06:32 +04:00
< a class = "push-right" href = "../two.html" data-transition = "slide-in" >
2013-12-22 02:48:48 +04:00
Load new page with push
< / a >
< / li >
< / ul >
< / div >
2013-10-25 18:33:44 +04:00
< / div >
2013-10-14 02:00:38 +04:00
< / div >
{% highlight html %}
2014-02-01 06:09:36 +04:00
< header class = "bar bar-nav" >
2013-10-14 02:00:38 +04:00
< h1 class = "title" > Push< / h1 >
< / header >
< div class = "content" >
2013-12-22 02:48:48 +04:00
< div class = "card" >
< ul class = "table-view" >
< li class = "table-view-cell" >
2014-02-17 00:06:32 +04:00
< a class = "push-right" href = "../two.html" data-transition = "slide-in" >
2013-12-22 02:48:48 +04:00
Load new page with push
< / a >
< / li >
< / ul >
< / div >
2013-10-14 02:00:38 +04:00
< / div >
{% endhighlight %}
2013-10-25 18:33:44 +04:00
< p class = "component-description" > Have a link you don't want to intercepted by push? Try this:< / p >
2013-10-14 02:00:38 +04:00
{% highlight html %}
<!-- Use data - ignore="push" to prevent the push.js interception -->
< a href = "http://www.google.com" data-ignore = "push" > Google< a >
{% endhighlight %}
2013-10-25 18:33:44 +04:00
< p class = "component-description" > Push.js binds an event to the document that returns a detail object and can be used to fire a callback.< / p >
2013-10-14 02:00:38 +04:00
{% highlight js %}
// Only needed if you want to fire a callback
window.addEventListener('push', myFunction);
{% endhighlight %}
2014-01-12 06:10:26 +04:00
< / article >
2014-02-24 14:20:28 +04:00
<!-- Ratchicons -->
2014-02-25 04:19:29 +04:00
< article class = "component no-border" id = "ratchicons" >
2014-02-24 14:20:28 +04:00
< h3 class = "component-title" > Ratchicons< / h3 >
< p class = "component-description" > Use Ratchicons in your application to help inform interactions.< / p >
< div class = "component-example" >
< div class = "content-padded" >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-home" > < / span >
< span class = "icon icon-person" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-bars" > < / span >
< span class = "icon icon-caret" > < / span >
< span class = "icon icon-check" > < / span >
< span class = "icon icon-close" > < / span >
< span class = "icon icon-code" > < / span >
< span class = "icon icon-compose" > < / span >
< span class = "icon icon-edit" > < / span >
< span class = "icon icon-gear" > < / span >
< span class = "icon icon-info" > < / span >
< span class = "icon icon-list" > < / span >
< span class = "icon icon-more" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-more-vertical" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-pages" > < / span >
< span class = "icon icon-play" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-pause" > < / span >
< span class = "icon icon-stop" > < / span >
< span class = "icon icon-back" > < / span >
< span class = "icon icon-forward" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-plus" > < / span >
< span class = "icon icon-refresh" > < / span >
< span class = "icon icon-search" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-download" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-share" > < / span >
< span class = "icon icon-sound" > < / span >
< span class = "icon icon-sound2" > < / span >
< span class = "icon icon-sound3" > < / span >
< span class = "icon icon-sound4" > < / span >
< span class = "icon icon-star-filled" > < / span >
< span class = "icon icon-star" > < / span >
< span class = "icon icon-trash" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-down-nav" > < / span >
< span class = "icon icon-down" > < / span >
< span class = "icon icon-left-nav" > < / span >
< span class = "icon icon-left" > < / span >
< span class = "icon icon-right-nav" > < / span >
< span class = "icon icon-right" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-up-nav" > < / span >
< span class = "icon icon-up" > < / span >
< / div >
< / div >
{% highlight html %}
< div class = "content-padded" >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-home" > < / span >
< span class = "icon icon-person" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-bars" > < / span >
< span class = "icon icon-caret" > < / span >
< span class = "icon icon-check" > < / span >
< span class = "icon icon-close" > < / span >
< span class = "icon icon-code" > < / span >
< span class = "icon icon-compose" > < / span >
< span class = "icon icon-edit" > < / span >
< span class = "icon icon-gear" > < / span >
< span class = "icon icon-info" > < / span >
< span class = "icon icon-list" > < / span >
< span class = "icon icon-more" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-more-vertical" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-pages" > < / span >
< span class = "icon icon-play" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-pause" > < / span >
< span class = "icon icon-stop" > < / span >
< span class = "icon icon-back" > < / span >
< span class = "icon icon-forward" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-plus" > < / span >
< span class = "icon icon-refresh" > < / span >
< span class = "icon icon-search" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-download" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-share" > < / span >
< span class = "icon icon-sound" > < / span >
< span class = "icon icon-sound2" > < / span >
< span class = "icon icon-sound3" > < / span >
< span class = "icon icon-sound4" > < / span >
< span class = "icon icon-star-filled" > < / span >
< span class = "icon icon-star" > < / span >
< span class = "icon icon-trash" > < / span >
2014-02-25 06:33:09 +04:00
< span class = "icon icon-down-nav" > < / span >
< span class = "icon icon-down" > < / span >
< span class = "icon icon-left-nav" > < / span >
< span class = "icon icon-left" > < / span >
< span class = "icon icon-right-nav" > < / span >
< span class = "icon icon-right" > < / span >
2014-02-24 14:20:28 +04:00
< span class = "icon icon-up-nav" > < / span >
< span class = "icon icon-up" > < / span >
< / div >
{% endhighlight %}
< / article >
2014-01-12 09:21:22 +04:00
<!-- Footer -->
{% include footer.html %}
2013-10-25 18:33:44 +04:00
< / div >
2014-01-12 06:10:26 +04:00
< / div >
< / div >