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.

+ 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 class="flex content-center justify-center flex-wrap h-screen bg-gray-200">
  <div id="browser" class="w-10/12 rounded overflow-hidden border border-gray-900">
    <div class="p-2 bg-gray-900 clearfix flex content-center">
      <div class="my-2 p-2 rounded-full bg-red-600"></div>
      <div class="my-2 ml-2 p-2 rounded-full bg-yellow-600"></div>
      <div class="my-2 ml-2 p-2 rounded-full bg-green-600"></div>
      <label for="user_id" class="block flex-grow flex content-center flex-no-wrap h-8 mx-2 bg-white rounded overflow-hidden text-gray-600 cursor-text">
        <span class="whitespace-no-wrap leading-none py-2 pl-2"></span>
        <input type="number" id="user_id" class="w-8 outline-none" value="3" min="1" onfocus=";" />
      <button class="flex items-center text-white hover:text-white px-2 text-xl outline-none">⋮</button>
    <div id="content" class="p-2 bg-white overflow-y-auto">
      <pre class="whitespace-pre-wrap"><code class="json" id="data"></code></pre>


                #content {
  max-height: 75vh;


                var $input = document.getElementById('user_id');

window.render = function () {
  var id = $input.value;
    .then(response => response.json())
    .then(response => response.user)
    .then(user => {
      var $data = document.getElementById('data');
      var data = {
        id: user.user_id,
        nickname: user.username,
        title: user.user_title,
        avatar: {
          original: user.avatar_urls.o,
          high: user.avatar_urls.h,
          large: user.avatar_urls.l,
          medium: user.avatar_urls.m,
          small: user.avatar_urls.s,
        location: user.location || null,
        pronoun: user.custom_fields.pronoun || null,
        date_of_birth: user.dob ? {
          year: user.dob.year,
          month: user.dob.month,
          age: user.age || null,
        } : null,
        biography: user.about || null,
        signature: user.signature || null,
        links: {
          website: || null,
          facebook: user.custom_fields.facebook ? ''+user.custom_fields.facebook : null,
          twitter: user.custom_fields.twitter ? ''+user.custom_fields.twitter : null,
          github: user.custom_fields.github || null,
          gitlab: user.custom_fields.gitlab || null,
          behance: user.custom_fields.behance || null,
          dribbble: user.custom_fields.dribbble || null,
          linkedin: user.custom_fields.linkedin || null,
        last_activity_at: moment.unix(user.last_activity),
        created_at: moment.unix(user.register_date),
        stats: {
          posts_sent: user.message_count,
          reactions_received: user.reaction_score,
          trophy_points: user.trophy_points,
        privileges: {
          can_ban: user.can_ban,
          can_converse: user.can_converse,
          can_edit: user.can_edit,
          can_follow: user.can_follow,
          can_ignore: user.can_ignore,
          can_post_profile: user.can_post_profile,
          can_view_profile: user.can_view_profile,
          can_view_profile_posts: user.can_view_profile_posts,
          can_warn: user.can_warn,
          is_staff: user.is_staff,
      $data.innerHTML = JSON.stringify(data, null, 4);

$input.addEventListener('change', window.render);