<div class="container mx-auto h-full flex flex-col justify-center items-stretch p-2 sm:p-8" x-data="{tab: 1}">
  <div class="ml-6 flex justify-start">
    <a class="block px-6 py-3 text-lg uppercase text-white rounded-tl-lg font-medium" :class="{'bg-black': tab === 1, 'bg-pink-800': tab !== 1}" href="#" @click.prevent="tab = 1">Tab 1</a>
    <a class="block px-6 py-3 text-lg uppercase text-white font-medium" :class="{'bg-black': tab === 2, 'bg-pink-800': tab !== 2}" href="#" @click.prevent="tab = 2" @click.prevent="tab = 2">Tab 2</a>
    <a class="block px-6 py-3 text-lg uppercase text-white rounded-tr-lg font-medium" :class="{'bg-black': tab === 3, 'bg-pink-800': tab !== 3}" href="#" @click.prevent="tab = 3" @click.prevent="tab = 3">Tab 3</a>

  </div>

  <div class="bg-gray-200 rounded-lg shadow-lg p-8" x-show="tab === 1">
    <h1 class="text-3xl leading-tight">Basic example of Alpine JS - Part 1</h1>
    <p class="text-base mt-4">Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus officia maiores ipsum illum enim repudiandae quaerat tenetur sunt dolore, voluptatem blanditiis quo doloremque commodi illo? Fugiat reiciendis aliquam omnis aperiam beatae? Officia, quas consequuntur numquam laboriosam dolorem totam est, vitae at nam iste autem inventore eveniet amet ex minima in asperiores debitis repudiandae eligendi. Sint esse dolorem est aperiam. Delectus!
    </p>
  </div>
  <div class="bg-green-200 rounded-lg shadow-lg p-8" x-show="tab === 2">
    <h1 class="text-3xl leading-tight">Basic example of Alpine JS - Part 2</h1>
    <p class="text-base mt-4">Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus officia maiores ipsum illum enim repudiandae quaerat tenetur sunt dolore, voluptatem blanditiis quo doloremque commodi illo? Fugiat reiciendis aliquam omnis aperiam beatae? Officia, quas consequuntur numquam laboriosam dolorem totam est, vitae at nam iste autem inventore eveniet amet ex minima in asperiores debitis repudiandae eligendi. Sint esse dolorem est aperiam. Delectus!</p>
  </div>
  <div class="bg-yellow-200 rounded-lg shadow-lg p-8" x-show="tab === 3">
    <h1 class="text-3xl leading-tight">Basic example of Alpine JS - Part 3</h1>
    <p class="text-base mt-4">Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus officia maiores ipsum illum enim repudiandae quaerat tenetur sunt dolore, voluptatem blanditiis quo doloremque commodi illo? Fugiat reiciendis aliquam omnis aperiam beatae? Officia, quas consequuntur numquam laboriosam dolorem totam est, vitae at nam iste autem inventore eveniet amet ex minima in asperiores debitis repudiandae eligendi. Sint esse dolorem est aperiam. Delectus!</p>
  </div>

</div>
.font-sans {
  font-family: "Raleway", sans-serif;
}

html,
body {
  font-size: 13px;
}

@media only screen and (min-width: 640px) {
  html,
  body {
    font-size: 14px;
  }
}

@media only screen and (min-width: 768px) {
  html,
  body {
    font-size: 15px;
  }
}

@media only screen and (min-width: 1024px) {
  html,
  body {
    font-size: 16px;
  }
}
document.body.classList.add("min-h-screen");
document.body.classList.add("h-full");

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.4.6/tailwind.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.