# FilterChip

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/tv/material3/ExperimentalTvMaterial3Api @https://developer.android.com/reference/kotlin/androidx/compose/runtime/NonRestartableComposable @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/tv/material3/FilterChip.composable#FilterChip(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.tv.material3.SelectableChipShape,androidx.tv.material3.SelectableChipColors,androidx.tv.material3.SelectableChipScale,androidx.tv.material3.SelectableChipBorder,androidx.tv.material3.SelectableChipGlow,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)( selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, onClick: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, onLongClick: (() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, leadingIcon: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, trailingIcon: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, shape: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipShape, colors: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipColors, scale: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipScale, border: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipBorder, glow: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipGlow, interactionSource: https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource?, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Material Design filter chip |

## Functions

### FilterChip

Artifact: [androidx.tv:tv-material](https://developer.android.com/jetpack/androidx/releases/tv) [View Source](https://cs.android.com/search?q=file:androidx/tv/material3/Chip.kt+function:FilterChip) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/tv#1.0.0)

```
@ExperimentalTvMaterial3Api
@NonRestartableComposable
@Composable
fun FilterChip(
    selected: Boolean,
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    onLongClick: (() -> Unit)? = null,
    leadingIcon: (@Composable () -> Unit)? = null,
    trailingIcon: (@Composable () -> Unit)? = null,
    shape: SelectableChipShape = FilterChipDefaults.shape(),
    colors: SelectableChipColors = FilterChipDefaults.colors(),
    scale: SelectableChipScale = FilterChipDefaults.scale(),
    border: SelectableChipBorder = FilterChipDefaults.border(),
    glow: SelectableChipGlow = FilterChipDefaults.glow(),
    interactionSource: MutableInteractionSource? = null,
    content: @Composable () -> Unit
): Unit
```

Material Design filter chip

Chips help people enter information, make selections, filter content, or trigger actions. Chips can show multiple interactive elements together in the same area, such as a list of selectable movie times, or a series of email contacts

Filter chips use tags or descriptive words to filter content. They can be a good alternative to toggle buttons or checkboxes

Tapping on a filter chip toggles its selection state. A selection state `https://developer.android.com/reference/kotlin/androidx/tv/material3/package-summary#FilterChip(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.tv.material3.SelectableChipShape,androidx.tv.material3.SelectableChipColors,androidx.tv.material3.SelectableChipScale,androidx.tv.material3.SelectableChipBorder,androidx.tv.material3.SelectableChipGlow,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)` can be provided (e.g. a checkmark) to be appended at the starting edge of the chip's label

| Parameters |
|---|---|
| `selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether this chip is selected or not |
| `onClick: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | called when this chip is clicked |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this chip |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | controls the enabled state of this chip. When `false`, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services |
| `onLongClick: (() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | callback to be called when the surface is long clicked (long-pressed) |
| `leadingIcon: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | optional icon at the start of the chip, preceding the `https://developer.android.com/reference/kotlin/androidx/tv/material3/package-summary#FilterChip(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Function0,kotlin.Function0,kotlin.Function0,androidx.tv.material3.SelectableChipShape,androidx.tv.material3.SelectableChipColors,androidx.tv.material3.SelectableChipScale,androidx.tv.material3.SelectableChipBorder,androidx.tv.material3.SelectableChipGlow,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)` text |
| `trailingIcon: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | optional icon at the end of the chip |
| `shape: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipShape = FilterChipDefaults.shape()` | Defines the Chip's shape |
| `colors: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipColors = FilterChipDefaults.colors()` | Color to be used on background and content of the chip |
| `scale: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipScale = FilterChipDefaults.scale()` | Defines size of the chip relative to its original size |
| `border: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipBorder = FilterChipDefaults.border()` | Defines a border around the chip |
| `glow: https://developer.android.com/reference/kotlin/androidx/tv/material3/SelectableChipGlow = FilterChipDefaults.glow()` | Shadow to be shown behind the chip |
| `interactionSource: https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource? = null` | an optional hoisted `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource` for observing and emitting `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction`s for this chip. You can use this to change the chip's appearance or preview the chip in different states. Note that if `null` is provided, interactions will still happen internally. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | for this chip, ideally a Text composable |