css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <html lang="en" ng-app="application">

  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>My First App</title>

<body ng-controller="SettingsController" class="gender-{{gender}}">

  <!-- This is a Panel. It slides in from the side of the screen. Usually contains a menu -->
  <div zf-panel="" id="panelName" position="left" animation-in="slideInRight" animation-out="slideOutLeft">
    <a zf-close="" class="close-button">x</a>
    <section class="block-list">
      <header>Welcome, {{name}}</header>
        <li><a href="#home">Home</a></li>
        <li><a href="#photos">Photos of my Favorite Animal</a></li>
        <li><a href="#examples">Examples</a></li>
        <li><a href="#settings">Settings</a></li>
        <li><a href="#website">Website</a></li>

  <!-- This is a Notification. Create as many of these as you would like. -->
  <zf-notification-static id="my-notify" title="Animal Notification" image="http://placehold.it/40x40" animation-in="hingeInFromTop" animation-out="hingeOutFromTop">
    <p>Hi {{name}}. Your favorite animal who is a member of the {{favoriteAnimal}} family just send you a message! </p>

  <!-- A Dialog. Like a notification, but it asks the user a question. -->
  <div zf-modal="" id="dialogModal" overlay="false" overlay-close="false" class="tiny dialog">
    <h4>Yo, do you <em>really</em> want to do this?</h4>
    <a zf-close="" class="alert button">Yeah</a>
    <a zf-close="" class="secondary button">Nah</a>

  <!-- Grid Frame. This is the app window. Everything visible on the app screen goes inside the grid frame -->
  <div class="grid-frame">
    <div class="grid-block vertical">

      <!-- The Title bar. Contains the name of the app and a few important buttons -->
      <div class="grid-content primary title-bar">
        <div class="center title">App Name</div>
        <span class="left"><a zf-open="panelName">Menu</a></span>
        <span class="right"><a href="#home">Right Link</a></span>

      <!-- This section represents a screen. This home screen will be shown when opening the app. -->
      <section data-id="home" class="grid-content">
        <!-- Creates a first level Heading -->
        <h1>Welcome to my app</h1>
        <!-- Creates a Paragraph -->
        <p>This is the home screen</p>
        <!-- Creates a link -->
        <a href="http://knowyourmeme.com/memes/grumpy-cat">This links to a website.</a>
        <a href="sms:9013002796&body=Hello from HackNight!">This link sends a Txt. (Mobile only)</a>
        <a href="tel:+1-512 643 6487">This link begins a phone call to Learn43</a>
        <a href="https://maps.apple.com/?q=Memphis">This links to a map of Memphis, TN</a>
        <!-- This creates a new line or line BReak -->
        <!-- Button that does something special in JavaScript -->
        <button class="button info next">Next Screen</button>

        <!-- Creates an IMaGe -->
        <img src="http://i2.kym-cdn.com/photos/images/newsfeed/000/406/325/b31.jpg" alt="My first image">


      <!-- This section represents a screen. Click a link with href="#photos" to show this screen. -->
      <section data-id="photos" class="grid-content">
        <div class="grid-block medium-up-4 small-up-2">
          <div ng-repeat="p in pics">
            <div class="card">
              <img src="{{p.images.low_resolution.url}}">
              <div class="card-divider">
                {{p.likes.count}} likes
              <div class="card-section">
                <h4>Sample Heading Heading</h4>
                <p>Caption Text for this image: {{p.caption.text}}</p>

      <!-- This is another screen called settings -->
      <section data-id="settings" class="grid-content">
        <div class="grid-block vertical">
          <h1 class="grid-content">Settings</h1>
          <h2 class="subheader grid-content">Tell us about yourself!</h2>
          <form class="grid-content">
            <label>Your Name
              <input type="text" placeholder="Name" ng-model="name">
            <label>Favorite Animal
              <select ng-model="favoriteAnimal">
                <option name='cats'>Red Socks</option>
                <option name='dogs'>Dogs</option>
              <select ng-model="gender">
                <option name=''></option>
                <option name='m'>Guy</option>
                <option name='f'>Girl</option>
            <label>Extra Setting
              <input type="text" placeholder="Whatever" ng-model="mySetting">
            <div class="grid-block align-justify" style="padding:0em 1em;">
              <p class="small-10">Dark Mode</p>
              <div class="small-2">
              <div class="switch dark-mode">
                <input type="checkbox" id="switch-example">
                <label for="switch-example"></label>

      <!-- Screen called Examples -->
      <section data-id="examples" class="grid-content">

        <!-- Triggers a panel -->
        <a zf-toggle="panelName" class="button">Toggles the panel with id = panelName</a>
        <!-- Triggers a notification -->
        <a class="button" href="#" zf-open="my-notify">Triggers Notifcation with id = my-notify</a>
        <!-- Triggers a Dialog modal -->
        <a zf-open="dialogModal" class="button">Trigger a Dialog Modal</a>


      <section data-id="website" class="grid-content">
        <iframe src='http://learn43.me'></iframe>


              .card img {
    max-width: 320px;

.title-bar.primary {
  background-color: lightGreen;
  border-bottom: 1px solid #ccc;
  color: #fff;
  padding: 1rem;

.button {
  background-color: green;
  color: #fff;
  border-radius: 25px;
  display: inline-block;
  font-size: 0.9rem;
  margin: 0 1rem 1rem 0;
  width: auto;

.button:focus {
  background-color: green;
  color: #fff;

.notification {
    background-color: navy;
    border-radius: 4px;
    padding: 1rem;

.close-button {
    color: #999;
    cursor: pointer;
    font-size: 1.5em;
    line-height: 0.5;
    position: absolute;
    right: 1rem;
    top: 0.7rem;

.modal-overlay > aside {
  border:1px solid black;

iframe {

.gender-Girl .title-bar.primary {
  background-color: pink;

.gender-Guy .title-bar.primary {
  background-color: blue;

/* Dark Mode */
body.dark {

body.dark h1 {

body.dark a {

              function nextScreen() {
  var currentScreen = window.location.hash;
  if (currentScreen == '#home' || currentScreen == '') {
    window.location.hash = '#photos';
  else {
    console.log('Next screen unknown because the current screen is ' + currentScreen);

//Select a button with class 'next'. When it is clicked, run a function called nextScreen
$('button.next').on('click', nextScreen);

$('a.button').on('click', function() {
  // wiggle, spin-ccw, shake

//This function runs everytime a screen changes.
var router = function() {
  //Get the Hash
	var route = window.location.hash.slice(1);
	var sections = $('section[data-id]');
	var section;

  //Hide all the screens, then ...
  //If the screen is not set, go to the Home screen.
	if (route.length < 1) {
		route = 'home'

	if (route.length) {
		section = sections.filter('[data-id=' + route + ']');

		if (section.length) {
      //... show the screen according to the route.
// When the page is loaded, show the correct content.
$(document).on('ready', router);
// When a link is clicked, show the correct content.
$(window).on('hashchange', router);

/* Be very careful below this line. */

    .filter('fromTo', function() {
        return function(input, from, total, lessThan) {
            from = parseInt(from);
            total = parseInt(total);
            for (var i = from; i < from + total && i < lessThan; i++) {
            return input;
    .factory('instagram', ['$http',
        function($http) {
            return {
                fetchPopular: function(tag, callback) {
                    var endPoint = "https://api.instagram.com/v1/tags/" + tag + "/media/recent?client_id=25f5d5ca23c841ff846b2694b0db6fb3&callback=JSON_CALLBACK";

                    $http.jsonp(endPoint).success(function(response) {
    .controller('SettingsController', function($scope, $interval, instagram) {
        $scope.name = 'Jane Doe';
        $scope.gender = 'M';
        $scope.favoriteAnimal = 'cats'; 
        $scope.mySetting = ''; 
        $scope.pics = [];
        $scope.have = [];
        $scope.getInstagram = function() {
          instagram.fetchPopular($scope.favoriteAnimal, function(data) {
              $scope.pics = [];
              for(var i=0; i<data.length; i++) {
                if (typeof $scope.have[data[i].id]==="undefined") {
                  $scope.pics.push(data[i]) ;
                  $scope.have[data[i].id] = "1";
        $(document).on('ready', function() {
          if (localStorage.getItem("scope") != null) {
            console.log('Restoring from local Storage');
            $scope.favoriteAnimal = localStorage.getItem('favoriteAnimal');
        $(window).on('hashchange', function() {
          //Save things to localStorage
          console.log('Saving to local Storage ' + $scope.favoriteAnimal);
          localStorage.setItem('favoriteAnimal', $scope.favoriteAnimal);
          console.log('Favorite Animal is now ' + localStorage.getItem('favoriteAnimal'));
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................