Skip to content

Instantly share code, notes, and snippets.

View Danwoj900's full-sized avatar
Skupienie

Daniel Danwoj900

Skupienie
View GitHub Profile
@Danwoj900
Danwoj900 / NeonButton.kt
Created May 14, 2026 14:24
Animowany, neonowy przycisk w Jetpack Compose 🟢
@Composable
fun NeonGlowButton(text: String, onClick: () -> Unit) {
val pulse by rememberInfiniteTransition("pulse").animateFloat(
initialValue = 0.95f,
targetValue = 1.05f,
animationSpec = infiniteRepeatable(tween(1000), RepeatMode.Reverse),
label = "scale"
)
Box(
@Danwoj900
Danwoj900 / ComposeButton.kt
Created May 14, 2026 14:00
Animowany przycisk w Jetpack Compose
@Composable
fun AnimatedPulseButton(onClick: () -> Unit) {
val infiniteTransition = rememberInfiniteTransition()
val scale by infiniteTransition.animateFloat(
initialValue = 1f,
targetValue = 1.1f,
animationSpec = infiniteRepeatable(
animation = tween(1000),
repeatMode = RepeatMode.Reverse
)