Neumorphismus Social-Media-Schaltflächen
Eine einfache Schaltflächenkomponente im Neumorphism-Stil für Social-Media-Schnittstellen mit responsivem Design und Unterstützung für den Dunkelmodus mit Tailwind CSS. Die Schaltfläche verwendet ein analoges Farbschema und subtile Schatten, um ein weiches, extrudiertes Aussehen zu erzeugen.
HTML-Code
<div class="flex items-center justify-center min-h-screen p-4 bg-gray-200 dark:bg-gray-800">
<button class="px-6 py-3 m-2 text-gray-700 transition-all duration-300 ease-linear bg-gray-200 rounded-full shadow-neumorphism-light hover:shadow-neumorphism-light-hover dark:bg-gray-700 dark:text-gray-200 dark:shadow-neumorphism-dark dark:hover:shadow-neumorphism-dark-hover">
Like
</button>
<button class="px-6 py-3 m-2 text-gray-700 transition-all duration-300 ease-linear bg-gray-200 rounded-full shadow-neumorphism-light hover:shadow-neumorphism-light-hover dark:bg-gray-700 dark:text-gray-200 dark:shadow-neumorphism-dark dark:hover:shadow-neumorphism-dark-hover">
Share
</button>
<button class="px-6 py-3 m-2 text-gray-700 transition-all duration-300 ease-linear bg-gray-200 rounded-full shadow-neumorphism-light hover:shadow-neumorphism-light-hover-analogous dark:bg-gray-700 dark:text-gray-200 dark:shadow-neumorphism-dark dark:hover:shadow-neumorphism-dark-hover-analogous">
Comment
</button>
</div>
<style>
@media (prefers-color-scheme: light) {
.shadow-neumorphism-light {
box-shadow: 5px 5px 10px #a7a7a7, -5px -5px 10px #ffffff;
}
.hover\:shadow-neumorphism-light-hover:hover {
box-shadow: 2px 2px 5px #a7a7a7, -2px -2px 5px #ffffff;
}
.hover\:shadow-neumorphism-light-hover-analogous:hover {
box-shadow: 2px 2px 5px #a7a7a7, -2px -2px 5px #ffeead;
}
}
@media (prefers-color-scheme: dark) {
.shadow-neumorphism-dark {
box-shadow: 5px 5px 10px #4a4a4a, -5px -5px 10px #363636;
}
.hover\:shadow-neumorphism-dark-hover:hover {
box-shadow: 2px 2px 5px #4a4a4a, -2px -2px 5px #363636;
}
.hover\:shadow-neumorphism-dark-hover-analogous:hover {
box-shadow: 2px 2px 5px #4a4a4a, -2px -2px 5px #808000;
}
}
</style>
Verwandte Komponenten
Glassmorphism Buttons-Komponente
Glassmorphism-Schaltflächen mit Erdtönen für eine reaktionsschnelle Portfolio-Website mit dunklem Modus
Buttons-Komponente
Eine minimalistische/flache Design-Schaltflächenkomponente mit einem Graustufen-Farbschema. Es eignet sich für Business-/Unternehmenswebsites und hat eine moderate Komplexität mit einigen interaktiven Funktionen. Es ist reaktionsschnell und unterstützt dunkles Theme mit Tailwind CSS.