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.


                <body class="text-center text-white bg-dark h-100 d-flex flex-column" x-data="{ showModal: false, name: '', email: '', success: false }">

    <div class=" d-flex h-100 p-3 mx-auto flex-column">

      <main role="main" class="flex-grow-1 mt-auto d-flex flex-column justify-content-center">
        <h1 class="cover-heading">New widget launching soon.</h1>
        <p class="lead">Not long to go until Acme Inc launch their latest product.</p>
        <p class="alert alert-success" x-show="success">Thanks <span x-text="name"></span> we will be in touch.</p>
        <p class="lead"  x-show="!success">
          <button class="btn btn-lg btn-secondary" @click="showModal = true" >Get in touch</button>

      <footer class="mastfoot mt-auto">
        <div class="inner">
          <p>Demo of AlpineJS for</p>

    <div class="modal  fade text-dark" :class="{ 'show d-block': showModal }" x-show="showModal" role="dialog">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title">Get in touch</h5>
            <button type="button" class="close" aria-label="Close" @click="showModal = false" >
              <span aria-hidden="true">&times;</span>
          <div class="modal-body">
            <div class="form-group">
              <label for="name">Your name</label>
              <input type="text" class="form-control" name="name" x-model="name" >

            <div class="form-group">
              <label for="email">Your email</label>
              <input type="email" class="form-control" name="email" x-model="email" >
          <div class="modal-footer">
            <button type="button" class="btn btn-primary" :disabled="!name || !email" @click="submitForm({name: name, email: email}).then(() => {
                showModal = false;
                success= true;




                function submitForm(data){
        return fetch('', {
          method: 'POST',
          body: JSON.stringify(data)