Skip to content

Instantly share code, notes, and snippets.

View aabadaa's full-sized avatar

Abdulaleem Alsayed aabadaa

  • Syria
View GitHub Profile
aabadaa / Swipable.kt
Created October 26, 2023 07:36
This composable enables you to create swipable cards or any other content easily , I created it because the material3 SwipeToDissmiss is throwing exception in this time
import androidx.compose.animation.core.animateIntAsState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableIntStateOf
aabadaa / AnimatedBorderCard.kt
Last active April 6, 2024 10:22 — forked from stevdza-san/AnimatedBorderCard.kt
Card with Animated Border built with Jetpack Compose.
// replace outer surface with clipToBounds modifier
fun AnimatedBorderCard(
modifier: Modifier = Modifier,
shape: Shape = RoundedCornerShape(size = 0.dp),
borderWidth: Dp = 2.dp,
gradient: Brush = Brush.sweepGradient(listOf(Color.Gray, Color.White)),
animationDuration: Int = 10000,
onCardClick: () -> Unit = {},