components

alerts

Alerts make it easy to display prominate information to the user. They are styled using colors from your palette or you can use the helper classes. Alerts can have an optional exit button and come in three sizes.

This is a unstyled alert.
This is a yellow alert.
This is a small green alert.
This is a plain alert.
This is a large red alert.

Alerts can have exit buttons with minimal markup:

This is a blue alert with an exit button.×
This is a large green alert with an exit button.×
This is a small unstyled alert with an exit button.×
This is a small yellow alert with an exit button.×
This is a large red alert with an exit button, just for fun.×

Note: Juiced has no JavaScript baked in. You must manually add any Javascript functionalty to hide alerts, Juiced makes this simple with CSS helper classes. See how  

            <div class="alert">
              This is a unstyled alert.
            </div>
            <div class="alert alert-yellow">
                This is a yellow alert.
            </div>
            <div class="alert alert-green alert-sm">
                This is a small green alert.
            </div>
            <div class="alert alert-plain">
              This is a plain alert.
            </div>
            <div class="alert alert-red alert-lg">
              This is a large red alert.
            </div>
         
          <div class="alert alert-blue">
             This is a blue alert with an exit button.  
            <a class="alert-exit cursor-pointer">&times;</a>
          </div>   
          
Add this JavaScript before your closing </body> tag for simple exit functionality:
            <script>
            (function(){
              var _exits = [].slice.call( document.querySelectorAll('.alert-exit') );
              _exits.forEach(function(ele) {
                   ele.addEventListener("click", function() {
                       var _parent = this.parentNode;
                        _parent.className = _parent.className + " display-none";
                   });
              });
            })();
            </script>
          
What does this JavaScript do? It loops through all elements with a class of .alert-exit and adds an event listener on the exit buttons. Now, when an exit button is clicked, a class of .display-none is added to the parent element to hide it (so don't wrap your exit markup).

buttons

Markup a button using a .btn class. Add .btn-sm or .btn-lg classes for smaller or larger buttons. Juiced makes no assumptions on how you will style your buttons so by default there are no colors, transitions, or hover effects. Buttons may be styled using the .radius, .btn-pill, .btn-block, and .btn-outline classes as well as the helper classes.

cards

Cards are in. You can create them with minimal markup using .card and child .card-content block elements. They can be styled using the helper classes.

Card containers

By default, cards fill 100% of the available width allowing them to sit nicely inside the Juiced grid. If you don't want to use the grid, you can wrap your cards with a .card-masonry block element, and they will be set to a max-width of 360px as shown in our examples below (see the masonry card below for more details).

code examples:

Card Images

Using the .card-img class sets the image to 100% width. This is useful for card with image based headers and footers.

.card-head

A container with classes .card-content and .card-header

Using .card-header adds a thin border on the bottom of the header section. It also spaces your heading tags and paragraph tags nicely for titles and subtitles.

Card Are Easy to Markup

Create cards with a .card element and use .card-content, .card-header, .card-footer, and .card-img for aligning and spacing content inside cards.

Style your cards

Cards can be styled using the helper classes and also with .radius and .no-border.

Want stackable masonry-like cards?

Use our built in .card-masonry classes to wrap all your cards. Reponsive breakpoints are the same, so .card-masonry-1 means one column on mobile and .sm-card-masonry-2 would switch to two columns on small screens and up. Juiced supports up to 4 columns for each breakpoint.

forms

Juiced has an opt-in class of .form-control for consistent styling across all your form elements. Radio buttons and checkboxes are minimally styled by default so you won't need to use .form-control on them.

Switches

Switches are the new way to stylize checkboxes and radio buttons. Markup a radio input with a class of .switch and a sibling label element with the same .switch class. And viola.. you have a switch! Add .radius, and .outline classes to your label for pretty styles.

                  <input class="switch" type="checkbox" id="ex1" name="checkbox" value="1">
                  <label class="switch radius outline" for="ex1">
                      Switch label
                  </label>
                

Switches use $color-primary, $color-white, and $color-light for border and background colors.

form examples:


See the markup  


TIPS:

All .form-control elements sit nicely in the Juiced grid and fill 100% of the available width.

Most Juiced components allow for a .radius helper class to be added for easy border rounding.

If you choose not to use the grid for spacing, Juiced will automatically provide margin's to any input wrapped in a label.

As shown in our example, there is no need for form-groups. Use the grid to nicely space your form elements.

            <form>
                 <div class="container gutters-sm-all items-center">
                      <div class="col-sm-4 text-left sm-text-right">
                           <label for="contact_name">Your Name:</label>
                      </div>
                      <div class="col-sm-8">
                           <input id="contact_name" placeholder="John Smith" name="name" type="text" class="form-control radius">
                      </div>
                      <div class="col-sm-4 text-left sm-text-right">
                            <label for="contact_email">Email Address:</label>  
                      </div>
                      <div class="col-sm-8">
                            <input id="contact_email" placeholder="john.smith@example.com" name="email" type="email" class="form-control radius">
                      </div>
                      <div class="col-sm-4 text-left sm-text-right">
                            <label for="contact_tel">Phone:</label>
                      </div>
                        <div class="col-sm-8">
                           <input id="contact_tel" placeholder="555.555.1212" name="phone" type="text" class="form-control radius">
                      </div>
                      <div class="col-sm-4 text-left sm-text-right">
                            <label for="contact_pass">Password:</label>
                      </div>
                      <div class="col-sm-8">
                           <input id="contact_pass" type="password" name="phone" class="form-control radius">
                      </div>
                      <div class="col-sm-4 text-left sm-text-right">
                            <label for="selections">Selections:</label>
                      </div>
                      <div class="col-sm-8">
                           <select id="selections" class="form-control">
                              <option value="1">1</option> <option value="2">2</option> <option value="3">3</option>
                           </select>
                      </div>
                      <div class="col-sm-4 text-left sm-text-right">
                            <label for="selections_multi">Multiple Selections:</label>
                      </div>
                      <div class="col-sm-8">
                           <select id="selections_multi" multiple class="form-control">
                              <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option>
                           </select>
                      </div>
                      <div class="col-sm-12">
                            <label for="contact_message">Message:</label>
                      </div>
                      <div class="col-sm-12">
                           <textarea id="contact_message" placeholder="How can we help you?" name="content" class="form-control"></textarea>
                      </div>
                     <div class="col-sm-6">
                           <label>
                              <input type="radio" name="radio" value="1">
                              Radio Option 1
                           </label>
                      </div>
                      <div class="col-sm-6">
                           <label>
                              <input type="radio" name="radio" value="2" checked>
                              Radio Option 2 Pre-checked
                           </label>
                      </div>
                      <div class="col-sm-6">
                           <label class="cursor-not-allowed">
                              <input type="radio" name="radio" value="3" disabled>
                             Radio Option 3 Disabled
                           </label>
                      </div>
                       <div class="col-sm-6">
                           <label>
                              <input type="checkbox" name="checkbox" value="3">
                              And checkbox
                           </label>
                      </div>       
                  <div class="col-12 text-center">
                       <button type="submit" class="btn radius color-white background-color-green hover-background-color-blue transition-fast cursor-pointer">Submit</button>
                  </div>
                 </div>
            </form>
          

Copyright 2015 Joey Lea. All rights reserved.