|
| 1 | +--- |
| 2 | +title: Appearance |
| 3 | +page_title: Appearance |
| 4 | +description: "Learn how to customize the appearance of the Telerik UI SpeechToTextButton HtmlHelper for {{ site.framework }}." |
| 5 | +slug: speechtotextbutton_appearance |
| 6 | +position: 2 |
| 7 | +--- |
| 8 | + |
| 9 | +# Appearance |
| 10 | + |
| 11 | +In this article, you will find information about the styling options of the {{ site.product }} SpeechToTextButton. |
| 12 | + |
| 13 | +For a live example, visit to the [Appearance Demo of the SpeechToTextButton component](https://demos.telerik.com/{{ site.platform }}/speechtotextbutton/appearance). |
| 14 | + |
| 15 | +## Options |
| 16 | + |
| 17 | +The SpeechToTextButton component provides the following options for styling: |
| 18 | + |
| 19 | +* [`Size()`](#size)—Configures the overall size of the component. |
| 20 | +* [`ThemeColor()`](#themecolor)—Sets what color will be applied to the component. |
| 21 | +* [`FillMode()`](#fillmode)—Defines how the color is applied to the SpeechToTextButton. |
| 22 | +* [`Rounded()`](#rounded)—Determines the border radius of the component. |
| 23 | +* [`Icon()` and `StopIcon()`](#icons)—Customize the default icons in the active and inactive states. |
| 24 | + |
| 25 | +### Size |
| 26 | + |
| 27 | +To control the size of the SpeechToTextButton, configure the `Size()` option with any of the following values: |
| 28 | + |
| 29 | +- `Small` |
| 30 | +- `Medium` (the default size) |
| 31 | +- `Large` |
| 32 | +- `None` |
| 33 | + |
| 34 | +```HtmlHelper |
| 35 | +@(Html.Kendo().SpeechToTextButton() |
| 36 | + .Name("speechButton") |
| 37 | + .Size(ComponentSize.Medium) |
| 38 | +) |
| 39 | +``` |
| 40 | +{% if site.core %} |
| 41 | +```TagHelper |
| 42 | +@addTagHelper *, Kendo.Mvc |
| 43 | +
|
| 44 | +<kendo-speechtotextbutton name="speechButton" size="ComponentSize.Medium"> |
| 45 | +</kendo-speechtotextbutton> |
| 46 | +``` |
| 47 | +{% endif %} |
| 48 | + |
| 49 | +### ThemeColor |
| 50 | + |
| 51 | +The `ThemeColor()` configuration provides a variety of colors that can be applied to the SpeechToTextButton. The available options are: |
| 52 | + |
| 53 | +- `Base` |
| 54 | +- `Primary` |
| 55 | +- `Secondary` |
| 56 | +- `Tertiary` |
| 57 | +- `Info` |
| 58 | +- `Success` |
| 59 | +- `Warning` |
| 60 | +- `Error` |
| 61 | +- `Dark` |
| 62 | +- `Light` |
| 63 | +- `Inverse` |
| 64 | +- `None` |
| 65 | + |
| 66 | +The default `ThemeColor` is `Base`. |
| 67 | + |
| 68 | +```HtmlHelper |
| 69 | +@(Html.Kendo().SpeechToTextButton() |
| 70 | + .Name("speechButton") |
| 71 | + .ThemeColor(ThemeColor.Base) |
| 72 | +) |
| 73 | +``` |
| 74 | +{% if site.core %} |
| 75 | +```TagHelper |
| 76 | +@addTagHelper *, Kendo.Mvc |
| 77 | +
|
| 78 | +<kendo-speechtotextbutton name="speechButton" theme-color="ThemeColor.Base"> |
| 79 | +</kendo-speechtotextbutton> |
| 80 | +``` |
| 81 | +{% endif %} |
| 82 | + |
| 83 | +### FillMode |
| 84 | + |
| 85 | +The `FillMode()` method specifies how the color is applied to the component. The default SpeechToTextButton fill mode is `Solid`. |
| 86 | + |
| 87 | +```HtmlHelper |
| 88 | +@(Html.Kendo().SpeechToTextButton() |
| 89 | + .Name("speechButton") |
| 90 | + .FillMode(ButtonFillMode.Solid) |
| 91 | +) |
| 92 | +``` |
| 93 | +{% if site.core %} |
| 94 | +```TagHelper |
| 95 | +@addTagHelper *, Kendo.Mvc |
| 96 | +
|
| 97 | +<kendo-speechtotextbutton name="speechButton" fill-mode="ButtonFillMode.Solid"> |
| 98 | +</kendo-speechtotextbutton> |
| 99 | +``` |
| 100 | +{% endif %} |
| 101 | + |
| 102 | +The following options are available for the `FillMode()` configuration: |
| 103 | + |
| 104 | +- `Solid` |
| 105 | +- `Outline` |
| 106 | +- `Flat` |
| 107 | +- `Link` |
| 108 | +- `Clear` |
| 109 | +- `None` |
| 110 | + |
| 111 | +### Rounded |
| 112 | + |
| 113 | +The border radius of the SpeechToTextButton can be customized through the `Rounded()` method. The default option is `Medium`. |
| 114 | + |
| 115 | +```HtmlHelper |
| 116 | +@(Html.Kendo().SpeechToTextButton() |
| 117 | + .Name("speechButton") |
| 118 | + .Rounded(Rounded.Medium) |
| 119 | +) |
| 120 | +``` |
| 121 | +{% if site.core %} |
| 122 | +```TagHelper |
| 123 | +@addTagHelper *, Kendo.Mvc |
| 124 | +
|
| 125 | +<kendo-speechtotextbutton name="speechButton" rounded="Rounded.Medium"> |
| 126 | +</kendo-speechtotextbutton> |
| 127 | +``` |
| 128 | +{% endif %} |
| 129 | + |
| 130 | +The following values are available for the `Rounded()` option: |
| 131 | + |
| 132 | +- `Small` |
| 133 | +- `Medium` |
| 134 | +- `Large` |
| 135 | +- `Full` |
| 136 | +- `None` |
| 137 | + |
| 138 | +### Icons |
| 139 | + |
| 140 | +The SpeechToTextButton displays different icons based on its [operational state]({% slug htmlhelpers_overview_speechtotextbutton%}#button-states). When the component is in inactive mode (ready to start recording), it displays the `microphone-outline` icon by default. You can customize this using the `Icon()` configuration option to specify a different icon that better fits your application's design. |
| 141 | + |
| 142 | +During active mode (while recording speech), the component automatically switches to the `stop-sm` icon to indicate that recording is in progress and can be stopped. The `StopIcon()` option allows you to override this default behavior with a custom icon of your choice. |
| 143 | + |
| 144 | +Select the desired icons from the comprehensive list of available <a href="https://www.telerik.com/design-system/docs/foundation/iconography/icon-list/" target="_blank">built-in icons in {{ site.product }}</a>. |
| 145 | + |
| 146 | +```HtmlHelper |
| 147 | +@(Html.Kendo().SpeechToTextButton() |
| 148 | + .Name("speechButton") |
| 149 | + .Icon("microphone-outline") |
| 150 | + .StopIcon("stop-sm") |
| 151 | +) |
| 152 | +``` |
| 153 | +{% if site.core %} |
| 154 | +```TagHelper |
| 155 | +@addTagHelper *, Kendo.Mvc |
| 156 | +
|
| 157 | +<kendo-speechtotextbutton name="speechButton" |
| 158 | + icon="microphone-outline" |
| 159 | + stop-icon="stop-sm"> |
| 160 | +</kendo-speechtotextbutton> |
| 161 | +``` |
| 162 | +{% endif %} |
| 163 | + |
| 164 | +## See Also |
| 165 | + |
| 166 | +* [Appearance of the SpeechToTextButton for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/speechtotextbutton/appearance) |
| 167 | +* [Server-Side API of the SpeechToTextButton](/api/speechtotextbutton) |
| 168 | +{% if site.core %} |
| 169 | +* [Server-Side API of the SpeechToTextButton TagHelper](/api/taghelpers/speechtotextbutton) |
| 170 | +{% endif %} |
| 171 | +* [Client-Side API of the SpeechToTextButton](https://docs.telerik.com/kendo-ui/api/javascript/ui/speechtotextbutton) |
0 commit comments