cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <form>
    <label for="type">Window Type:</label>
    <select id="type">
        <option value="osx">osx</option>
        <option value="ubuntu" selected>ubuntu</option>
        <option value="windows">windows</option>
        <option value="custom">custom</option>
    </select>
    <label for="dark">dark</label>
    <input type="checkbox" id="dark" checked/>
</form>
<!-- shell.js terminal window -->
<div class="shell ubuntu dark shadow">
    <div class="status-bar">
        <div class="buttons">
            <a href="javascript:;" class="close" title="Close">
                <i class="fa fa-times"></i>
            </a>
            <a href="javascript:;" class="minimize" title="Minimize">
                <i class="fa fa-minus"></i>
                    
            </a>
            <a href="javascript:;" class="enlarge" title="Enlarge">
                <i class="fa fa-plus"></i>
                    
            </a>
                    
        </div>
        <div class="title">user@host: ~</div>
    </div>
    <div class="content"></div>
</div>

            
          
!
            
              form {
    margin: 10px;
}
body .shell {
    width: 400px;
    height: 200px;
}
.shell .typed-cursor, .shell .cursor {
    background: transparent;
}
.shell > .status-bar .title {
    cursor: move;
}
/*
 * fix to shell.js to center title to free space
 */
.shell.windows .status-bar .title {
    right: 106px;
}
@supports (--css: variables) {
    .shell.ubuntu .terminal {
        --background: #300924;
    }
    .shell.osx .content.terminal {
        --background: #222;
    }
    .shell.light .content.terminal {
        --background: white;
        --color: black;
    }
    /*
    * windows and custom are the last ones so
    * they don't get overwritten by light
    */
    .shell.windows .content.terminal {
        --background: black;
        --color: white;
        --animation: terminal-underline;
    }   
    .shell.custom .content.terminal {
        --background: #292929;
        --color: #aaa;
    }
}
/*
 * overwrite shell.js style because shell.js   
 * selectors are stronger then terminal ones
 */
.cmd span.cursor {
    animation: none;
    width: auto;
    background-color: var(--background, #000);
}
.shell terminal.content,
.shell.osx.dark .content,
.shell.ubuntu .content {
    background-color: var(--background, #222) !important;
}
.shell .terminal.content {
    font-size: 12px;
}
.cmd {
    background-color: inherit;
}
@supports (--css: variables) {
    .shell .terminal.content {
        font-size: calc(var(--size, 1) * 12px);
    }
}
            
          
!
            
              var shell = $('.shell').resizable({
    minHeight: 108,
    minWidth: 250
}).draggable({
    handle: '> .status-bar .title'
});
var term = $('.content').terminal($.noop, {
    prompt: 'user@host:~ '
});
$('#type').on('change', function() {
    shell.removeClass('osx windows ubuntu default custom').addClass(this.value);
    var prompt;
    if (this.value == 'windows') {
        prompt = 'C:\\Windows\\>';
    } else {
        prompt = 'user@host:~ ';
    }
    term.toggleClass('underline-animation', this.value == 'windows');
    term.set_prompt(prompt);
    $('.title').html(prompt);
});
$('#dark').on('change', function() {
    shell.removeClass('dark light');
    if (this.checked) {
        shell.addClass('dark');
    } else {
        shell.addClass('light');
    }
});
$('#type, #dark').on('change', function() {
    setTimeout(function() {
        term.focus();
    }, 400)
});
github('jcubic/jquery.terminal');
            
          
!
999px
Loading ..................

Console