Componenti Schede Componente Schede

Componente Schede

Un componente di schede reattive progettato per la modalità oscura utilizzando Tailwind CSS. È dotato di diverse schede su cui gli utenti possono fare clic per rivelare i contenuti, insieme a immagini segnaposto e avatar.

Anteprima

Codice HTML

<div class="bg-gray-800 text-white rounded-lg shadow-md">
    <div class="flex border-b border-gray-700">
        <button class="py-2 px-4 text-sm font-medium hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-600" onclick="showTab('tab1')">Tab 1</button>
        <button class="py-2 px-4 text-sm font-medium hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-600" onclick="showTab('tab2')">Tab 2</button>
        <button class="py-2 px-4 text-sm font-medium hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-600" onclick="showTab('tab3')">Tab 3</button>
    </div>
    <div id="tab1" class="p-4">
        <h2 class="text-lg font-semibold">Tab 1 Content</h2>
        <p>Content for tab 1 goes here.</p>
        <img src="https://picsum.photos/400/200?random=1" alt="Placeholder Image" class="rounded-md mt-2">
        <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-2">
            <span>John Doe</span>
        </div>
    </div>
    <div id="tab2" class="hidden p-4">
        <h2 class="text-lg font-semibold">Tab 2 Content</h2>
        <p>Content for tab 2 goes here.</p>
        <img src="https://picsum.photos/400/200?random=2" alt="Placeholder Image" class="rounded-md mt-2">
        <div class="flex items-center mt-4">
            <img src="https://randomuser.me/api/portraits/women/1.jpg" alt="Avatar" class="w-10 h-10 rounded-full mr-2">
            <span>Jane Doe</span>
        </div>
    </div>
    <div id="tab3" class="hidden p-4">
        <h2 class="text-lg font-semibold">Tab 3 Content</h2>
        <p>Content for tab 3 goes here.</p>
        <img src="https://picsum.photos/400/200?random=3" alt="Placeholder Image" class="rounded-md mt-2">
        <div class="flex items-center mt-4">
            <img src="https://randomuser.me/api/portraits/men/2.jpg" alt="Avatar" class="w-10 h-10 rounded-full mr-2">
            <span>Mike Smith</span>
        </div>
    </div>
</div>

Componenti correlati

Componente Schede

Un componente di schede reattive con microinterazioni per siti Web aziendali/aziendali, con colori complementari e supporto per la modalità scura.

Aperto

Componente Schede Neumorfismo

Un componente a schede neumorfiche per le interfacce utente della dashboard, con una combinazione di colori in scala di grigi, un design reattivo e il supporto del tema scuro utilizzando solo HTML e Tailwind CSS.

Aperto

Schede di progettazione dei materiali Componente

Un componente Tabs in stile Material Design che utilizza Tailwind CSS, con effetti reattivi e supporto per temi scuri.

Aperto