Komponenten Tabulatoren MaterialDesignRegisterkarten

MaterialDesignRegisterkarten

Eine responsive Tabs-Komponente, die den Material Design-Prinzipien mit Tailwind CSS folgt, einschließlich Unterstützung des Dunkelmodus und responsiver Effekte.

Vorschau

HTML-Code

<div class="material-tabs-container">
  <div class="material-tabs-header">
    <button class="material-tab-button active">Tab 1</button>
    <button class="material-tab-button">Tab 2</button>
    <button class="material-tab-button">Tab 3</button>
  </div>
  <div class="material-tabs-content">
    <div class="material-tab-pane active">
      <h2 class="text-xl font-bold mb-4">Content of Tab 1</h2>
      <p>This is the content for Tab 1. It follows Material Design guidelines with responsive padding and font sizes.</p>
      <img src="https://picsum.photos/seed/picsum/400/200" alt="Placeholder Image" class="my-4 rounded-md">
      <div class="flex items-center mt-4">
        <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar" class="w-10 h-10 rounded-full mr-4">
        <span>Posted by John Doe</span>
      </div>
    </div>
    <div class="material-tab-pane">
      <h2 class="text-xl font-bold mb-4">Content of Tab 2</h2>
      <p>This is the content for Tab 2, showcasing different types of information within a tabbed interface.</p>
      <ul class="list-disc list-inside mt-4">
        <li>Item 1</li>
        <li>Item 2</li>
        <li>Item 3</li>
      </ul>
    </div>
    <div class="material-tab-pane">
      <h2 class="text-xl font-bold mb-4">Content of Tab 3</h2>
      <p>This is the content for Tab 3. Each tab pane can contain varied content, adhering to the responsive design.</p>
      <p class="text-gray-700 dark:text-gray-300 mt-4">Additional text for Tab 3 content.</p>
    </div>
  </div>
</div>

<style>
  /* Basic Material Design inspired styles */
  .material-tabs-container {
    @apply bg-white dark:bg-gray-800 shadow-md rounded-md p-4;
  }

  .material-tabs-header {
    @apply flex border-b border-gray-200 dark:border-gray-700;
  }

  .material-tab-button {
    @apply py-2 px-4 text-center text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 focus:outline-none;
    transition: color 0.3s ease;
  }

  .material-tab-button.active {
    @apply border-b-2 border-blue-600 dark:border-blue-400 text-blue-600 dark:text-blue-400;
  }

  .material-tabs-content {
    @apply mt-4;
  }

  .material-tab-pane {
    @apply hidden;
  }

  .material-tab-pane.active {
    @apply block;
  }

  /* Responsive adjustments */
  @media (max-width: 600px) {
    .material-tabs-header {
      @apply flex-col;
    }

    .material-tab-button {
      @apply w-full text-left;
    }
  }

  /* Dark mode styles */
  /* Handled by Tailwind's dark: utility classes */
</style>

Verwandte Komponenten

Tabs-Komponente

Eine responsive Tabs-Komponente, die in einem skeuomorphen Stil für eine E-Commerce-Anwendung entworfen wurde, unter Verwendung eines pastellfarbenen Farbschemas und Tailwind CSS.

Offen

Tabs-Komponente

Eine minimalistische Tabs-Komponente für E-Commerce-Websites mit interaktiven Elementen, responsivem Design und Unterstützung für den Dunkelmodus.

Offen

Glassmorphism Tabs-Komponente

Eine responsive Tabs-Komponente im Glassmorphism-Stil, die für Social-Media-Schnittstellen entwickelt wurde. Es verfügt über einen Milchglas-ähnlichen Effekt unter Verwendung von Tailwind CSS mit einem Graustufen-Farbschema. Das Design unterstützt den Dunkelmodus.

Offen