day-and-night-switch
1.0.1indexedCreates a realistic, visually appealing switch inspired by a popular meme, featuring light and shadow effects, and written entirely with Compose Multiplatform.
40
Stars
—
Used by
dependents
—
Health
/ 100
Creates a realistic, visually appealing switch inspired by a popular meme, featuring light and shadow effects, and written entirely with Compose Multiplatform.
Realistic and fancy switch that is inspired by a popular meme about Designer vs. Developer

See an example on GitHub Pages (Works with Chrome, Chromium-based, and Firefox)
val version = "1.0.1"
// Common
implementation("com.akexorcist.kotlin.multiplatform:dayandnight:")
implementation()
implementation()
implementation()
implementation()
implementation()
implementation()
var selected by remember { mutableStateOf(true) }
// Switch Only
DayAndNightSwitch(
modifier = Modifier,
selected = selected,
onSwitchToggle = { selected = !selected },
)
// With Container
DayAndNightContainer(
modifier = Modifier.fillMaxSize(),
selected = selected,
) {
DayAndNightSwitch(
modifier = Modifier.scale(2f),
selected = selected,
onSwitchToggle = { selected = !selected },
)
}
If you're curious about how I built this library



gradlew desktopRun -DmainClass=MainKt --quietgradlew wasmJsBrowserDevelopmentRungradlew build commonizeNativeDistribution./iosApp/iosApp.xcodeproj with XcodeSurfaced from shared tags and platforms — no rankings paid for.