Swinging Bell Notification Icon
Create an animated notification bell with Tailwind
Last updated
Create an animated notification bell with Tailwind
Last updated
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" {{ $attributes->merge(['class'=>'inline-block']) }}>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9">
</path>
</svg>@if($notifications->count() > 0)
<span class="text-base tracking-tighter text-yellow-500">
<x-svg.bell class="h-5 -mr-1 align-text-top animate-swing origin-top"/>
<sup>{{ $notifications->count() }}</sup>
</span>
@endifextend: {
keyframes: {
'swing': {
'0%,100%' : { transform: 'rotate(15deg)' },
'50%' : { transform: 'rotate(-15deg)' },
}
},
animation: {
'swing': 'swing 1s infinite'
}
}