Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


  %h3 To-Do with AngularJS
  %div(ng-controller="toDoListController as toDoList")
      %li(ng-repeat="task in toDoList.tasks")
        %span(ng-click="toDoList.remove(task)") {{task.text}}
      %input(type='text' placeholder='Enter new item here' ng-model="toDoList.toDoText")
      %input(type='submit' value='Add')



                body {
  font-family: 'Open Sans', sans-serif;
  font-size: 100%; 
  line-height: 1.5;
  background-color: #304ffe;
  #toDo {
    border-radius: 3px;
    padding: 0 15px 15px;
    width: 250px;
    margin: 5em auto;
    border: 1px solid #ddd;
    h3 {
      text-align: center;
      color: #fff;
      padding: 5px 0;
      font-weight: 300;
      margin-top: 4px;
      cursor: default;

    ul {
      list-style-type: disc;
      margin: 0 0 20px 0;
      line-height: 1.5;
      color: white;
      cursor: pointer;
      padding-left: 15px;

      li {
          transition:0.5s linear all;
        span {
          position: relative;
          overflow-wrap: break-word;

        span:before, span:after {
          content: '';
          position: absolute;
          width: 0%;
          height: 1px;
          top: 50%;
          margin-top: -0.5px;
          background: #fff;

        span:before {
          left: -2.5px;
        span:after {
          right: 2.5px;
          background: #fff;
          transition: width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);

        span:hover:before {
          background: #fff;
          width: 100%;
          transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);

        span:hover:after {
          background: transparent;
          width: 100%;
          transition: 0s;

    input[type=text] {
      border: 0;
      border-bottom: 1px solid #ccc;
      background-color: transparent;
      padding: 7px 5px;
      width: 150px;
      font-size: 14px;
      color: white;
      outline: none;

    input[type=submit] {
      border: 0;
      border-radius: 5px;
      background-color: #ec407a;
      color: white;
      margin-left: 30px;
      padding: 5px 15px;
      font-size: 1em;
      float: right;



                /* AngularJS ToDo App 
  - Placed in DOM element with ID of "toDo"
  - Angular version 1.5.5

// create angular module
angular.module("toDoApp", [])
  .controller("toDoListController", function() {
    var toDoList = this;
    toDoList.tasks = [{text: 'Task 1'}];
      toDoList.addToDo = function() {
      toDoList.toDoText = '';
    toDoList.remove = function(task) {
      // get index number of clicked element
      var index = toDoList.tasks.indexOf(task);
      // remove item from array
      toDoList.tasks.splice(index, 1);