---
title: "clearAndSetSemantics"
description: "Allow specifying semantic properties on a curved component, and clearing the existing properties.
Note that currently only [CurvedSemanticsScope.contentDescription] and
[CurvedSemanticsScope.traversalIndex] are supported, and they can be applied to curved text and
curvedComposable

Sample for clearing semantics:"
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun CurvedModifier.clearAndSetSemantics(
    properties: CurvedSemanticsScope.() -> Unit
): CurvedModifier
```


Allow specifying semantic properties on a curved component, and clearing the existing properties.
Note that currently only `CurvedSemanticsScope.contentDescription` and
`CurvedSemanticsScope.traversalIndex` are supported, and they can be applied to curved text and
curvedComposable

Sample for clearing semantics:

#### Parameters

| | |
| --- | --- |
| properties | The properties to apply, `SemanticsPropertyReceiver` will be provided in the scope to allow access for common properties and its values. |




## Code Examples
### CurvedClearSemanticsSample
```kotlin
@Composable
fun CurvedClearSemanticsSample() {
    val style =
        CurvedTextStyle(
            letterSpacing = 0.6.sp,
            letterSpacingCounterClockwise = 1.4.sp,
            color = Color.White,
        )
    Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
        CurvedLayout(modifier = Modifier.fillMaxSize()) {
            basicCurvedText("This is not announced", style, CurvedModifier.clearAndSetSemantics {})
        }
        Row { Text("This is announced", Modifier.semantics { traversalIndex = -1f }) }
    }
}
```

