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">
  <!-- 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>
      <div zf-panel="" id="panelName">
        <p>This is a basic panel</p>
      <!-- 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>
        <a zf-toggle="panelName">Toggle Panel</a>
      <!-- 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'>Cats</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">

              .card img {
    max-width: 320px;

.title-bar.primary {
  background-color: navy;
  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;

              $('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. */

    .controller('SettingsController', function($scope, $interval) {
        $scope.name = 'Jane Doe';
        $scope.gender = 'Guy';
        $scope.favoriteAnimal = 'cats'; 
        $scope.mySetting = '';  
🕑 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 ..................