Skip to content
TheChatArchiveThe Chat Archive
Qwenqwen3-235b-a22b-no-thinking· Alibaba (Qwen)Hugging Face LMArena Human Preference 140K

Code for me simple landing page in nuxt and tailwindcss

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.0-flash-001’s answer.
  1. User

    Code for me simple landing page in nuxt and tailwindcss

  2. Qwen Assistant

    Sure! Here's a simple landing page built using Nuxt 3 and Tailwind CSS. This will include:

    • A hero section with heading, subheading, and call-to-action (CTA) button.
    • Responsive layout using Tailwind.
    • Nuxt 3 setup instructions included.

    ✅ Step-by-step Setup

    1. Create a new Nuxt 3 project

    npx nuxi init nuxt-landing-page
    cd nuxt-landing-page
    

    2. Install Tailwind CSS

    Nuxt 3 supports Tailwind out of the box via the @nuxtjs/tailwindcss module.

    npm install --save-dev @nuxtjs/tailwindcss
    

    Then add it to your nuxt.config.ts:

    // nuxt.config.ts
    export default defineNuxtConfig({
      modules: ['@nuxtjs/tailwindcss']
    })
    

    📄 Landing Page Code

    Now replace the contents of pages/index.vue with the following:

    <template>
      <div class="min-h-screen bg-gray-50">
        <!-- Navbar -->
        <header class="bg-white shadow">
          <div class="max-w-7xl mx-auto px-4 py-4 flex justify-between items-center">
            <h1 class="text-xl font-bold text-indigo-600">MyLanding</h1>
            <nav>
              <a href="#features" class="mx-2 text-gray-700 hover:text-indigo-600">Features</a>
              <a href="#contact" class="mx-2 text-gray-700 hover:text-indigo-600">Contact</a>
            </nav>
          </div>
        </header>
    
        <!-- Hero Section -->
        <section class="bg-white">
          <div class="max-w-7xl mx-auto px-4 py-16 text-center">
            <h2 class="text-4xl font-extrabold text-gray-900 sm:text-5xl">
              Welcome to Our Amazing Product
            </h2>
            <p class="mt-4 text-lg text-gray-600 max-w-xl mx-auto">
              A simple, beautiful landing page to showcase your product or service.
            </p>
            <div class="mt-6">
              <a
                href="#contact"
                class="inline-block px-6 py-3 bg-indigo-600 text-white font-medium rounded-md shadow hover:bg-indigo-700 transition"
              >
                Get Started
              </a>
            </div>
          </div>
        </section>
    
        <!-- Features Section -->
        <section id="features" class="bg-gray-100 py-16">
          <div class="max-w-7xl mx-auto px-4">
            <h3 class="text-2xl font-bold text-gray-800 text-center mb-8">Features</h3>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
              <div class="bg-white p-6 rounded shadow">
                <h4 class="text-xl font-semibold mb-2">Fast & Responsive</h4>
                <p class="text-gray-600">Built with performance in mind. Optimized for speed and mobile responsiveness.</p>
              </div>
              <div class="bg-white p-6 rounded shadow">
                <h4 class="text-xl font-semibold mb-2">Easy to Customize</h4>
                <p class="text-gray-600">Tailwind makes styling easy and consistent across all components.</p>
              </div>
              <div class="bg-white p-6 rounded shadow">
                <h4 class="text-xl font-semibold mb-2">Modern Design</h4>
                <p class="text-gray-600">Clean UI that looks great on any device. Ready to be extended.</p>
              </div>
            </div>
          </div>
        </section>
    
        <!-- Contact Section -->
        <section id="contact" class="bg-white py-16">
          <div class="max-w-7xl mx-auto px-4 text-center">
            <h3 class="text-2xl font-bold text-gray-800 mb-4">Get In Touch</h3>
            <p class="text-gray-600 mb-6">Have questions or want to learn more?</p>
            <a
              href="mailto:hello@example.com"
              class="inline-block px-6 py-3 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition"
            >
              Contact Us
            </a>
          </div>
        </section>
    
        <!-- Footer -->
        <footer class="bg-gray-800 text-white py-6">
          <div class="max-w-7xl mx-auto px-4 text-center">
            <p>&copy; {{ new Date().getFullYear() }} MyLanding. All rights reserved.</p>
          </div>
        </footer>
      </div>
    </template>
    
    <script setup>
    useHead({
      title: 'My Landing Page',
      meta: [
        { name: 'description', content: 'A simple landing page built with Nuxt 3 and Tailwind CSS' }
      ]
    })
    </script>
    

    ✅ Result

    You'll get a responsive landing page with:

    • Clean navigation bar
    • Hero section with CTA
    • Feature highlights
    • Contact section
    • Footer

    🚀 Run the Project

    npm run dev
    

    Open http://localhost:3000 in your browser.


    Let me know if you'd like to add animations, dark mode, email signup form, or deploy it somewhere like Vercel or Netlify!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.