[android-components](../../index.md) / [mozilla.components.ui.widgets](../index.md) / [WidgetSiteItemView](index.md) / [setText](./set-text.md)

# setText

`fun setText(label: `[`CharSequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`, caption: `[`CharSequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)`?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/ui/widgets/src/main/java/mozilla/components/ui/widgets/WidgetSiteItemView.kt#L52)

Sets the text displayed inside of the site item view.

### Parameters

`label` - Main label text, such as a site title.

`caption` - Sub caption text, such as a URL. If null, the caption is hidden.