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.


    <input id='inputText' type='text' placeholder='your text here'></input>
    <input id='reset' type='reset' value='Clear'></input>
    <button onClick="clap()">👏</button>
    <button onClick="sassyClap()">👏🙄</button>
    <button onClick="sassy()">🙄</button>
    <button onClick="threaten()">💰</button>
  <div id='results'>
    <input id="code" type='text'></input>
    <button id='btn_copy' onClick='copyText()'>Copy to Clipboard</button>



                @import url(;

button {
  border-radius: 12px;
  -webkit-transition-duration: 0.4s;
  transition-duration: 0.4s;
  background-color: #b9cfd6;
  margin: 10px;
  font-family: 'Raleway';
  font-weight: bold;
  padding: 10px;
  font-size: 20px;

button:hover {
  background-color: #4e7a87;
  color: white;
  box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
    -webkit-transform: rotate(10deg);
          transform: rotate(10deg);

button:active {
    background-color: #3e8e41;
    box-shadow: 0 5px #666;
    transform: translateY(4px);

input {
  border: none;
  border-bottom: 2px solid black;
  margin: 15px;
  font-family: 'Raleway';
  font-weight: bold;


                var output = '';
document.getElementById('results').style.display = "none";

// Add clap emojis between words
function clap() {
  output = '';  
  output = createResponse(getRequest(), 'clap');  
  document.getElementById('code').value = output;

// Spongebob Casing
function sassy() {
  output = '';
  output = createResponse(getRequest(), 'sassy');
  document.getElementById('code').value = output;

// Ransom Note
function threaten(){
  output = '';
  output = createResponse(getRequest(), 'threaten');
  document.getElementById('code').value = output;

// Get text from input
function getRequest() {
  document.getElementById('results').style.display = "block";
  return document.getElementById('inputText').value;

// Returns response from respective get calls
function createResponse(input, formatType) {
  if (formatType == 'clap')
    return getClapResponse(input);  
  else if (formatType == 'sassy')
    return getSassyResponse(input);

function getSassyResponse(input) {
  for (var i = 0; i < input.length; i++) {
    if (input[i] == 'i' || input[i] == 'I')
      output += 'i'; // i's should never be capitalized
    else if (input[i] == 'l' || input[i] == 'L')
      output += 'L'; // L's should never be lower case
    else if (i % 2 == 0)
     output += input[i].toUpperCase();
     output += input[i];
  return output;

// Split text by spaces; add in spaces and clap emojis
function getClapResponse(input) {
  output = input.split(" ").join(" 👏 ");
  return output.toUpperCase();

function sassyClap() {
  output = '';
  output = createResponse(getRequest(), 'sassy').split(" ").join(" 👏 ");
  document.getElementById('code').value = output;

// Copy text in output field
function copyText() {
  var copyText = document.getElementById("code");;