For our slides and templates, we’ve provided a wide range of ready-to-use components you can modify for your projects.
Sidebar
Click anywhere outside the element to close the sidebar. When the sidebar is on the screen, it blocks the ability to change slides.
To make a sidebar appear in the viewport, add a class sidebarTrigger on any element and data-sidebar-id="unique-id" for elements AND a sidebar to link them together.
You can animate the contents of a sidebar by adding animated class on the sidebar element and ae-X for elements inside of it:
<navclass="sidebar animated"data-sidebar-id="unique-id"> <divclass="close"><svg><usehref="assets/svg/icons.svg#close"></use></svg></div> <divclass="content"> <h1class="ae-1">I will appear first</h1> <pclass="ae-2">I will appear second</p> <buttonclass="ae-3">I will appear third</button> </div></nav>
We’ve also created several different sidebar layouts you can choose from.
Popup
Popups display above everything else on the page. To trigger the appearance of a popup, add the class popupTrigger on any element you want and data-popup-id="unique-id" for the element AND a popup to link them together.
For popups with the content centered, use this code:
<divclass="popup"data-popup-id="unique-id"> <divclass="close"><svg><usehref="assets/svg/icons.svg#close"></use></svg></div> <divclass="content"> <divclass="container"> <divclass="wrap"><!-- content on the center of a screen --> </div> </div> </div></div>
Autoplay Video
You can enable autoplay of Youtube and Vimeo videos embedded with iframe by adding a autoplay class on the popup element:
You can create a slider with videos inside your popup and play the video on the chosen slide. In this case, you don't need to add autoplay class on the popup element, but you should add it to each video inside your popup.
To close a popup, click on any element that includes the close class or by clicking on an element with the data-popup-action="close" class inside of the opened popup:
<divclass="popup"data-popup-id="unique-id"> <divclass="close"><svg><usehref="assets/svg/icons.svg#close"></use></svg></div> <divclass="content popupContent"> <divclass="container"> <divclass="wrap"> <ahref="#hash"data-popup-action="close">Close and Link to a Slide</a> </div> </div> </div></div>
Hide on Click
Popups are used mainly to embed video content. By default, clicking on the empty or body area outside the video container will hide the video popup window. If you want to remove that ability, simply add a class popupContent on your content element:
<divclass="popup"data-popup-id="unique-id"> <divclass="close"><svg><usehref="assets/svg/icons.svg#close"></use></svg></div> <divclass="content popupContent"> <divclass="container"> <divclass="wrap"><!-- content on the center of a screen --> </div> </div> </div></div>
Animate Popup
You can animate the contents of a popup by adding animated class on the popup element and ae-X for elements inside of it:
<divclass="popup animated"data-popup-id="unique-id"> <divclass="close ae-1 fromRight"><svg><usehref="assets/svg/icons.svg#close"></use></svg></div> <divclass="content popupContent"> <divclass="container"> <divclass="wrap"> <h1class="ae-1">I will appear first</h1> <pclass="ae-2">I will appear second</p> <buttonclass="ae-3">I will appear third</button> </div> </div> </div></div>
Focus on element in popup
If your popup has a <form>...</form> tag in it, you can focus on any focusable element (<input>, <textarea></textarea>, <select>) inside this form. To do that, add data-popup-focus-input="unique-input-id" to your popupTrigger and set this unique-input-id to the element inside <form>...</form> you'd like to focus on.
<button class="popupTrigger" data-popup-id="popup-id" data-popup-focus-input="unique-input-id">Open popup and focus on input</button>
<divclass="popup"data-popup-id="popup-id"> <divclass="close"><svg><usehref="assets/svg/icons.svg#close"></use></svg></div> <divclass="content"> <formaction=""method="post"class="slides-form wide"> <inputclass="wide"type="text"name="name"placeholder="Your Name"id="unique-input-id"> <buttontype="submit"class="button wide green margin-top-2 cropBottom">Send</button> </form> </div></div>
The slider we’ve included in Slides allows you to change images on slides by clicking on simple navigation indicators. A sample of a working slider is here. It’s possible to have multiple sliders on your page, but be careful to add unique IDs to each one.
You can add the total slide counter and display the current slide number. Just add an element with sliderCounter class and put in an element with class now for displaying the current slide number and element with class total to show the total number of slides:
With the class autoplay on your slider element, your photos (or other elements) will advance in sequence automatically. The default slide-change interval is 5 seconds. Update the attribute data-slider-interval="5000" to change the default 5000 milliseconds interval time.
You can put a video inside your slider. If you will set autoplay class to the <iframe> or <video> tag this video will be played when its parent slide will be opened.
Add a autoHeight class on your slider element to manually set the correct height of the element each time you change the slider element. This way you can make a smooth animation between elements:
You can place the Slides share dropdown anywhere on a page, but we’ve used it mainly on top and bottom panels to include share capabilities on all slides.
To request the appearance of a dropdown use class dropdownTrigger with data-dropdown-id="unique-id" on your button or link.
Initially, the dropdown in Slides is positioned in the top left corner. You can change where the dropdown is located by adding right, center and bottom classes on a dropdown element.
Initially, the dropdown in Slides is revealed on click. You can change it to hover by adding hover class on the dropdownTrigger element.
<divclass="dropdownTrigger hover"data-dropdown-id="unique-id">Show on hover</div><divclass="dropdown bottom right"data-dropdown-id="unique-id"><!-- content --></div>
Share
We used the awesome Sharrre jQuery plugin to provide a suitable share window with a click. You can insert the text of your choice in your tweet with data-text="Place your message here". Add your URL with data-url="https://designmodo.com". For Pinterest, add your image with data-pinterest-image="http://path.to/your/image.jpg". For the email's subject and body add data-subject="Subject" and data-body="Body" on mail element:
<div class="dropdown share bottom right" data-dropdown-id="unique-id" data-text="Take a look at this" data-url="https://designmodo.com" data-pinterest-image="https://designmodo.com/wp-content/uploads/2015/10/Presentation.jpg">
<divclass="center padding-2"> <divclass="title">Share</div> <ahref="#">Contact us</a> </div> <ul> <liclass="social-facebook"><svg><usehref="assets/svg/icons.svg#fb-like"></use></svg></li> <liclass="social-twitter"><svg><usehref="assets/svg/icons.svg#twitter"></use></svg></li> <liclass="social-googlePlus"><svg><usehref="assets/svg/icons.svg#googlePlus"></use></svg></li> <liclass="social-linkedin"><svg><usehref="assets/svg/icons.svg#linkedin"></use></svg></li> <liclass="mail"data-subject="Subject"data-body="Body">share by email</li> </ul></div>
Dialog
You can use dialog messages on your Slides projects for things like notifying users of new features, accepting cookies and inviting them to subscribe or communicate with site visitors.
First of all, you need to add <div class="dialogContainer"></div> to your page. All of your dialog windows will be added to this div.
Below is the code for a simple dialog message.
<divclass="dialogContainer"> <divclass="dialog"> <divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text"> Your text message here. </div> </div> </div></div>
If you want your dialog to be shown with the animation when the page loaded, just add hidden class and data-dialog-action="open" attribute to a div with a dialog class
Position
You can change the position of the dialog message by adding left and/or bottom classes to the dialogContainer element.
<divclass="dialogContainer left bottom"> <divclass="dialog"> <divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text"> Your text message here. </div> </div> </div></div>
Buttons
You have the option of adding up to three buttons to the bottom of your Dialog message. These buttons can have internal or external links, dialog actions, or even an email form.
A dialog window can contain hidden parts of messages that can be revealed only on mouse hover. The code below shows how this is done.
<divclass="dialogContainer"> <divclass="dialog"> <divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text"> Visible by default <divclass="hiddenContent">Hidden content will show up on hover.</div> </div> </div> <divclass="hiddenContent"> <ul> <lidata-dialog-action="close">Close</li> <lidata-href="http://google.com/">Visit</li> </ul> </div> </div> </div>
Subscribe Form
You can also use a dialog as a subscribe form to acquire new users.
You can find working examples here:
<divclass="dialogContainer"><!-- Email Form Dialog --> <divclass="dialog hidden"data-dialog-id="form"> <divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text center"> <strong>Hey Vladimir</strong>, Just for today we have a 30% discount for Ink UI. </div> </div> <formaction="path-to-your-subscribe-script.php"method="post"autocomplete="on"> <ul> <li><inputtype="email"autocomplete="on"placeholder="Enter your email"></li> <liclass="indigo"data-type="submit">Submit</li> </ul> </form> </div></div>
Show Dialog
To show a dialog window make sure that it has a data-dialog-id="unique-id" attribute with unique value. Then add data-dialog-action="open" and data-dialog-id="unique-id" attributes to any element.
You can also open dialog with JS code. Just call the $('.dialog[data-dialog-id=unique-id]').slidesDialog('open');.
<!-- Buttons to show dialog --><divclass="button"data-dialog-action="open"data-dialog-id="unique-id">Show Dialog</div><divclass="button"onclick="$('.dialog[data-dialog-id=unique-id]').slidesDialog('open');">Show Dialog with JS</div><divclass="dialogContainer"><!-- Dialog --> <divclass="dialog hidden"data-dialog-id="unique-id"> <divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text"> Your text message here. </div> </div> </div></div>
Close Dialog
You can hide the Dialog message in different ways:
By clicking on any element with data-dialog-action="close" attribute located inside the dialog element.
By clicking on any element with data-dialog-action="close" and data-dialog-action="close" attribute located outside the dialog element.
Using JS code $('.dialog[data-dialog-id=unique-id]').slidesDialog('close');.
By adding data-dialog-cookie-age="30" attribute to your dialog element. In this case, the dialog will be shown once and then will not be shown for 30 days.
Setting a cookie with a name equals to dialog-id attribute of a dialog. Just add onclick="$.cookie('unique-id',true,{expires:30,path:'/'});" to any element to set a cookie by clicking.
<!-- Buttons to hide dialog --><divclass="button"data-dialog-action="close"data-dialog-id="unique-id">Close Dialog</div><divclass="button"onclick="$('.dialog[data-dialog-id=unique-id]').slidesDialog('close');">Close Dialog with JS</div><div class="button" onclick="$('.dialog[data-dialog-id=unique-id]').slidesDialog('close'); $.cookie('unique-id',true,{expires:30,path:'/'});">Close Dialog and don't show it for 30 days</div>
<divclass="dialogContainer"><!-- Dialog --> <divclass="dialog"data-dialog-id="unique-id"data-dialog-cookie-age="30"> <divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text"> Your text message here. </div> </div> <ul> <lidata-dialog-action="close">Close</li> </ul> </div></div>
Open dialog with delay, and hide automatically.
You can open the dialog window in a few seconds after the page loads. To do so, add data-dialog-open-delay="1000" attribute to your dialog element.
You can also hide a dialog after a few seconds, to do so, add data-dialog-close-delay="3000" attribute to your dialog element.
The values are in ms, so 1000 equals a 1-second delay.
<divclass="dialogContainer"><!-- Show after 1 second and hide after 3 seconds --> <div class="dialog hidden" data-dialog-id="unique-id" data-dialog-action="open" data-dialog-open-delay="1000" data-dialog-close-delay="3000">
<divclass="close"data-dialog-action="close"></div> <divclass="dialogContent"> <divclass="text"> This dialog is shown after 1 second and will be closed after 3 seconds. </div> </div> </div></div>
Create a Dialog message with JavaScript
You can create a dialog using just JavaScript and nothing else. Your dialog will be applied to the <div class="dialogContainer"></div> element. You can also see the full list of dialog options below:
<!-- Create and Show Dialog window --><divclass="button createDialog">Create Dialog</div><script>$('.createDialog').on('click',function(){$.fn.slidesDialog({ id:"dialog-new",// this id will be added to a dialog as a "data-dialog-id" attribute// this is an HTML code of a dialog template:''+'<div class="dialog hidden">'+'<div class="close" data-dialog-action="close"></div>'+'<div class="dialogContent">'+'<div class="text opacity-8">This dialog was created with javascript.</div>'+'</div>'+'<ul>'+'<li data-dialog-action="close" class="indigo">Nice!</li>'+'</ul>'+'</div>', action:"open",// open or close dialog after initialization. Default is "close" speed:500,// open/close animation speed in ms. Default is 500 openAfter:1000,// wait X ms to show the dialog. Default is 0 closeAfter:3000// wait X ms to hide the dialog. Default is 0. }); });</script>
You can find more button examples here. Also, other button types are shown below.
Play Buttons
<ahref="#"class="button play"><svg><usehref="assets/svg/icons.svg#play"></use></svg></a><ahref="#"class="button play small red"><svg><usehref="assets/svg/icons.svg#play"></use></svg></a>
You can adjust the width of an element or container using the fix-X-12 classes. By default, these containers are centrally aligned. Add the toLeft class to align it left and toRight to align right.
<divclass="fix-1-12">Container maximum width is 80px</div><divclass="fix-2-12">Container maximum width is 180px</div><divclass="fix-3-12">Container maximum width is 280px</div><divclass="fix-4-12">Container maximum width is 380px</div><divclass="fix-5-12">Container maximum width is 480px</div><divclass="fix-6-12">Container maximum width is 580px</div><divclass="fix-7-12">Container maximum width is 680px</div><divclass="fix-8-12">Container maximum width is 780px</div><divclass="fix-9-12">Container maximum width is 880px</div><divclass="fix-10-12">Container maximum width is 980px</div><divclass="fix-11-12">Container maximum width is 1080px</div><divclass="fix-12-12">Container maximum width is 1180px</div><divclass="fix-4-12 toLeft">Left-aligned container</div><divclass="fix-4-12 toRight">Right-aligned container</div>
Flex
Grid allows you to split the content into as many as 12 columns and lets you set a specific position for elements on a page. View all Flex Examples.
The spaces between rows are relative to the width of the screen by default. If you want to make spaces fixed, just add a class fixedSpaces or noSpaces on flex element.
By default, columns will be converted to rows when the device screen width is less than 1024px. You can add the later class on the flex element, which will delay the switch from columns to rows until the screen size shrinks to less than 768px.
Very often, content from one column might be taller than in another, breaking visual symmetry. To prevent this, add a class equal on flex element and equalElement on each element you want to be even. This operation is managed by javascript and runs on load and resize.
By default, the height equalizer works on screens wider than 1024px. Add the later class to your equal element to make it work from 767px screens and wider. You can also define the exact breakpoint by adding the data-equal-collapse-width="X" attribute. In the end, you can add the equalMobile class to make elements equal on any screen size.
<!-- elements are equal on screens wider than 1024px --><ulclass="flex equal"> <liclass="col-6-12 equalElement">Col 1</li> <liclass="col-6-12 equalElement">Col 2</li></ul><!-- elements are equal on screens wider than 767px --><ulclass="flex equal later"> <liclass="col-6-12 equalElement">Col 1</li> <liclass="col-6-12 equalElement">Col 2</li></ul><!-- elements are equal on screens wider than 480px --><ulclass="flex equal"data-equal-collapse-width="480"> <liclass="col-6-12 equalElement">Col 1</li> <liclass="col-6-12 equalElement">Col 2</li></ul><!-- elements are equal on any screen sizes --><ulclass="flex equal equalMobile"> <liclass="col-6-12 equalElement">Col 1</li> <liclass="col-6-12 equalElement">Col 2</li></ul>
Fixed Width Content
Hold content in a fixed container inside flex columns using this code.
<ul class="flex">
<li class="col-4-12">
<div class="fix-3-12">Thinner than 4</div>
</li>
<li class="col-4-12">
<div class="fix-3-12">Thinner than 4</div>
</li>
<li class="col-4-12">
<div class="fix-3-12">Thinner than 4</div>
</li>
</ul>
You can push your fixed container to a left or right side of a flex column by adding toLeft or toRight classes:
<ul class="flex">
<li class="col-4-12">
<div class="fix-3-12 toLeft">Container on the Left</div>
</li>
<li class="col-4-12">
<div class="fix-3-12">Container centered</div>
</li>
<li class="col-4-12">
<div class="fix-3-12 toRight">Container on the Right</div>
</li>
</ul>
Vertical Alignment
You can align columns within the parent element using top, bottom, horizontalCenter or verticalCenter classes.
<!-- Columns vertically centered -->
<ul class="flex verticalCenter">
<li class="col-6-12">Tall <br>block</li>
<li class="col-6-12">Short block</li>
</ul>x`
<!-- Columns stick to the top -->
<ul class="flex top">
<li class="col-6-12">Tall <br>block</li>
<li class="col-6-12">Short block</li>
</ul>
<!-- Columns stick to the bottom -->
<ul class="flex bottom">
<li class="col-6-12">Tall <br>block</li>
<li class="col-6-12">Short block</li>
</ul>
You can use an mp3 audio track as a part of your presentation of as background audio to set the right mood. Here is how you can make it:
You can use mp3 audio tracks as background audio to set the right mood in your slides. Here’s the code you need to add and control audio in Slides, including the speaker icon.
You can send and receive data from the contact form on Slide #55, Slide #157, Slide #163, and Slide #166 with AJAX (without page reloading). The form automatically sends this data to the ajax-email.php script which is located in the root folder of the Slides or Template you've downloaded from Template Generator. To make the script work, open the ajax-email.php file with any text editor and add your email which will enable you to receive messages from the form. You can also set the subject of an email. Note that this script will work only on a PHP server with SendMail installed.
Note: The PHP code included in Slides will forward form information to the email address you input only after you upload your site to your web hosting provider. By default, the PHP form code will not work on your local host server. Once your site is uploaded, the form’s submit button will function correctly.
You can customize your content using the following status classes, depending on various situations and specific requirements. Here are some classes you may find useful:
<style>
/* Applied on the <html> element */
.page-ready { } /* When DOM is ready */
.page-loaded { } /* When page is completely loaded */
.resizing { } /* When resizing */
.retina { } /* For devices with high resolution/pixel density */
.mobile { } /* For all iOS, Android, Blackberry, etc. */
.android { } /* For Android device only */
.safari { } /* For Safari browsers */
.firefox { } /* For Firefox */
.chrome { } /* For Chrome */
.msie { } /* For Microsoft Internet Explorer */
.windows { } /* For Windows Users */
.osx { } /* For Mac OS X Users */
.linux { } /* For Linux Users */
.popupShown { } /* When Popup is shown */
.popup_id { } /* When Popup with id="id" is visible */
.sidebarShown { } /* When Sidebar is shown */
.sidebar_id { } /* When Sidebar with id="id" is visible */
.dropdownShown { } /* When Dropdown is shown */
.dropdown_id { } /* When Dropdown with id="id" is visible */
/* Applied on the <body> element */
.firstSlide { } /* When we are on the last slide */
.lastSlide { } /* When we are on the last slide */
.stage-3 { } /* When we are on the third slide only. You can use any number, obviously. */
.slides.whiteSlide { } /* When the current slide is a white slide. Use with .slides to separate it from elements inside .slide */
/* Applied on a slide */
.slide.selected { } /* Selected slide */
.slide.active { } /* Any visible slide is active */
.slide.animate { } /* When animation is started */
</style>
Using those status classes shown above, you can control any element or group of elements on your page. Here are some examples:
<style>
.osx .button.downloadOSX,
.linux .button.downloadLinux,
.windows .button.downloadWindows { display:block; }
.button.downloadButton { display:none;}
</style>
<a href="#download-url-windows" class="button downloadButton downloadWindows">Download for Windows</a>
<a href="#download-url-mac" class="button downloadButton downloadOSX">Download for Mac OS X</a>
<a href="#download-url-linux" class="button downloadButton downloadLinux">Download for Linux</a>
Responsive Control
You can easily hide any element on mobile device screens by adding the CSS classes shown below:
<!-- For a screen 1024px wide and smaller -->
<div class="hideForTablet">
Invisible for a Tablet Device
</div>
<div class="showForTablet" style="display:none">
Visible for a Tablet Device
</div>
<!-- For a screen 768px wide and smaller -->
<div class="hideForPhablet">
Invisible for Phablet Device
</div>
<div class="showForPhablet" style="display:none">
Visible for a Phablet Device
</div>
<!-- For a screen 436px wide and smaller -->
<div class="hideForPhone">
Invisible for Phone Devices
</div>
<div class="showForPhone" style="display:none">
Visible for Phone Devices
</div>
<!-- For any mobile device (phone, phablet, or tablet) -->
<div class="hideForMobile">
Invisible for a mobile device
</div>
<div class="showForMobile" style="display:none">
Visible only for a mobile device
</div>
Typography
To speed up your coding process we've created a few classes to set your font weight, style, and size.
Also, this scaling model works with all the headings (H1-H6 HTML tags). All the classes are screen-size responsive, which means that the smaller screen you've got, the smaller heading will be. You don't need to set CSS font-size property using @media() query anymore!
You can also use direct font-size-X classes on any element to set its font-size:
These direct font-size-X classes also have a responsive versions:
<style>
/* Replace the number to the value from 8 to 24 */
/* Works on screens less than 1023px wide */
.font-size-tablet-14 {font-size: 14px !important;}
/* Works on screens less than 767px wide */
.font-size-phablet-12 {font-size: 12px !important;}
/* Works on screens less than 435px wide */
.font-size-phone-10 {font-size: 10px !important;}
</style>