Disclosures
Disclosuresanimated

Bordered group

A single bordered card holding a divided group of independently toggling rows.

Account

Manage email, password and sessions.

Billing

Installation

caveui components are copy-paste Jetpack Compose built entirely on Material 3 — there's no caveui dependency to add. Make sure Material 3 is on your classpath (it ships with the Compose BOM), then copy the Usage snippet below into your project.

kotlin
// build.gradle.kts (module)
dependencies {
    implementation(platform("androidx.compose:compose-bom:2025.06.00"))
    implementation("androidx.compose.material3:material3")
}

Usage

kotlin
@Composable
fun DisclosureGroup(items: List<Pair<String, String>>) {
    OutlinedCard {
        Column {
            items.forEachIndexed { i, (title, body) ->
                var open by remember { mutableStateOf(false) }
                Column(Modifier.clickable { open = !open }.padding(14.dp)) {
                    Row(verticalAlignment = Alignment.CenterVertically) {
                        Text(title, Modifier.weight(1f),
                            style = MaterialTheme.typography.titleSmall)
                        Icon(Icons.Filled.ExpandMore, null,
                            Modifier.rotate(if (open) 180f else 0f))
                    }
                    AnimatedVisibility(open) {
                        Text(body, Modifier.padding(top = 6.dp),
                            style = MaterialTheme.typography.bodySmall,
                            color = MaterialTheme.colorScheme.onSurfaceVariant)
                    }
                }
                if (i < items.lastIndex) HorizontalDivider()
            }
        }
    }
}