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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


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.

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.


    <div id="app">


  --base: #454545;
  --background: #b3dbf5;
  --foreground: rgba(30, 144, 255, 0.72);
  --font: #FFF;

  box-sizing: border-box;
  font-size: 16px;
  font-family: helvetica, arial, "sans-serif";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--font);
  background: var(--background);
  margin: 0;

    box-sizing: inherit;

  display: grid;
  align-items: center;
  justify-content: center;
  height: 400px;
  overflow: none;

  box-shadow: -2px 4px 10px 0 #7d7d7d;
	flex-flow: row wrap;
  background: dodgerblue;
  padding: 20px;
  & > *{
    flex: 1 100%;

  padding: 40px;
  display: flex;
  justify-content: center;

  margin-top: 20px;
  text-align: center;
  font-size: 1.6rem;
  display: block;

  border: none;
  border-radius: 0px;
  border-bottom: 1px solid grey;
  font-size: 1.4rem;
  padding: 10px;
  outline: none;

  background: var(--base);
  color: var(--font);
  margin: 0;
  font-size: 1.4rem;
  padding: 10px;


                new Vue({
    el: "#app",
    template: `  
    <div class="container">
    <label for="text-box" class="checkResult">{{ display }}</label>
        <form class="form-container" @submit.prevent="checkIfPalindrome">
            <!-- We could remove the submit button and form and simply use "onkeyup" :D -->
            <input name="text-box" v-model="word" type="text"/>
            <button type="submit">submit</button>
    data() {
        return {
            word: "",
            display: ""
    methods: {
        checkIfPalindrome() {
            // Check the word entered against its reverse
            // Check word is not an empty string or false
            if (this.word && this.word === this.wordToCheck) {
                this.display = `"${this.word}" is a palindrome!`;
            } else if (this.word && this.word !== this.wordToCheck) {
                this.display = `"${this.word}" is not a palindrome`;
            } else {
                this.display = "You need to enter some text!";
            return (this.word = "");
    created() {
        this.display = "Palindrome Checker";
    computed: {
        word() {
            // Remove anything non-alphanumeric and spaces.
                .replace(/[^0-9a-z]/gi, "");
        wordToCheck() {
            // Mirror the word to check it's the same string both ways.
            return this.word