|
| 1 | +--- |
| 2 | +title: Appearance |
| 3 | +page_title: Styling the Appearance of the Chip Helper |
| 4 | +description: "Learn how to manage the appearance of the Telerik UI Chip component for {{ site.framework }} and apply its various styling options." |
| 5 | +slug: htmlhelpers_chip_aspnetcore_appearance |
| 6 | +position: 2 |
| 7 | +--- |
| 8 | + |
| 9 | +# Chip Appearance |
| 10 | + |
| 11 | +The Chip provides predefined appearance options such as different sizes, border radiuses, fill modes, and theme colors. |
| 12 | + |
| 13 | +For a live example, refer to the [Appearance Demo of the Chip](https://demos.telerik.com/{{ site.platform }}/chip/appearance). |
| 14 | + |
| 15 | +The Telerik UI Chip supports the following styling options: |
| 16 | + |
| 17 | +- [`Size`](#size)—Configures the overall size of the component. |
| 18 | +- [`ThemeColor`](#theme-color)—Configures what color will be applied to the component. |
| 19 | +- [`FillMode`](#fill-mode)—Configures how the color is applied to the component. |
| 20 | +- [`Rounded`](#border-radius)—Configures the border radius of the component. |
| 21 | + |
| 22 | +## Size |
| 23 | + |
| 24 | +The `Size` option controls how big or small the rendered `Chip` looks. |
| 25 | + |
| 26 | +```HtmlHelper |
| 27 | + @(Html.Kendo().Chip() |
| 28 | + .Name("chip") |
| 29 | + .Size(ComponentSize.Medium) |
| 30 | + .Label("Chip") |
| 31 | + ) |
| 32 | +``` |
| 33 | +{% if site.core %} |
| 34 | +```TagHelper |
| 35 | + @addTagHelper *, Kendo.Mvc |
| 36 | +
|
| 37 | + <kendo-chip name="chip" |
| 38 | + size="ComponentSize.Medium" |
| 39 | + label="Chip"> |
| 40 | + </kendo-chip> |
| 41 | +``` |
| 42 | +{% endif %} |
| 43 | + |
| 44 | +The [`Size`](/api/Kendo.Mvc.UI.Fluent/ChipBuilder#sizekendomvcuicomponentsize) option accepts the following values: |
| 45 | + |
| 46 | +- `ComponentSize.Small`—Small size. |
| 47 | +- (Default) `ComponentSize.Medium`—Medium size. |
| 48 | +- `ComponentSize.Large`—Large size. |
| 49 | +- `ComponentSize.None`—Unset. |
| 50 | + |
| 51 | +The structure of the class is `k-chip-{size}`. The default size value is `Мedium` and is applied to the rendered `div` element through the `k-chip-md` class. |
| 52 | + |
| 53 | +```html |
| 54 | +<div class="k-chip k-chip-md" > |
| 55 | +</div> |
| 56 | +``` |
| 57 | + |
| 58 | +## Fill Mode |
| 59 | + |
| 60 | +The `FillMode` option controls the way the color is applied to the rendered `div`. |
| 61 | + |
| 62 | +```HtmlHelper |
| 63 | + @(Html.Kendo().Chip() |
| 64 | + .Name("chip") |
| 65 | + .FillMode(ChipFillMode.Solid) |
| 66 | + .Label("Chip") |
| 67 | + ) |
| 68 | +``` |
| 69 | +{% if site.core %} |
| 70 | +```TagHelper |
| 71 | + @addTagHelper *, Kendo.Mvc |
| 72 | +
|
| 73 | + <kendo-chip name="chip" |
| 74 | + fill-mode="ChipFillMode.Solid" |
| 75 | + label="Chip"> |
| 76 | + </kendo-chip> |
| 77 | +``` |
| 78 | +{% endif %} |
| 79 | + |
| 80 | +The [`FillMode`](/api/Kendo.Mvc.UI.Fluent/ChipBuilder#fillmodekendomvcuichipfillmode) option accepts the following values: |
| 81 | + |
| 82 | +- (Default) `ChipFillMode.Solid` |
| 83 | +- `ChipFillMode.Outline` |
| 84 | + |
| 85 | +The structure of the Html class is `k-chip-{fillMode}`. The default `fillMode` value is `Solid` and is applied to the rendered `div` element through the `k-chip-solid` class. |
| 86 | + |
| 87 | +```html |
| 88 | +<div class="k-chip k-chip-solid" > |
| 89 | +</div> |
| 90 | +``` |
| 91 | + |
| 92 | +## Theme Color |
| 93 | + |
| 94 | +The `ThemeColor` option controls the color that will be applied to the rendered Chip. |
| 95 | + |
| 96 | +```HtmlHelper |
| 97 | + @(Html.Kendo().Chip() |
| 98 | + .Name("chip") |
| 99 | + .ThemeColor(ChipThemeColor.Base) |
| 100 | + .Label("Chip") |
| 101 | + ) |
| 102 | +``` |
| 103 | +{% if site.core %} |
| 104 | +```TagHelper |
| 105 | + @addTagHelper *, Kendo.Mvc |
| 106 | +
|
| 107 | + <kendo-chip name="chip" |
| 108 | + theme-color="ChipThemeColor.Base" |
| 109 | + label="Chip"> |
| 110 | + </kendo-chip> |
| 111 | +``` |
| 112 | +{% endif %} |
| 113 | + |
| 114 | +The [`ThemeColor`](/api/Kendo.Mvc.UI.Fluent/ChipBuilder#themecolorkendomvcuithemecolor) option accepts the following values: |
| 115 | + |
| 116 | +- (Default) `ChipThemeColor.Base` |
| 117 | +- `ChipThemeColor.Info` |
| 118 | +- `ChipThemeColor.Success` |
| 119 | +- `ChipThemeColor.Warning` |
| 120 | +- `ChipThemeColor.Error` |
| 121 | + |
| 122 | +The default `ThemeColor` value is `base`. A Chip with default `FillMode` and `ThemeColor` settings will have the `k-chip-solid-base` class applied. |
| 123 | + |
| 124 | +```html |
| 125 | +<!-- A Chip with default fillMode and themeColor settings --> |
| 126 | +<div class="k-chip k-chip-solid k-chip-solid-base" > |
| 127 | +</div> |
| 128 | +``` |
| 129 | + |
| 130 | +## Border Radius |
| 131 | + |
| 132 | +The `Rounded` option controls how much border radius is applied to the rendered Chip. |
| 133 | + |
| 134 | +```HtmlHelper |
| 135 | + @(Html.Kendo().Chip() |
| 136 | + .Name("chip") |
| 137 | + .Rounded(Rounded.Medium) |
| 138 | + .Label("Chip") |
| 139 | + ) |
| 140 | +``` |
| 141 | +{% if site.core %} |
| 142 | +```TagHelper |
| 143 | + @addTagHelper *, Kendo.Mvc |
| 144 | +
|
| 145 | + <kendo-chip name="chip" |
| 146 | + rounded="Rounded.Medium" |
| 147 | + label="Chip"> |
| 148 | + </kendo-chip> |
| 149 | +``` |
| 150 | +{% endif %} |
| 151 | + |
| 152 | +The [`Rounded`](/api/Kendo.Mvc.UI.Fluent/ChipBuilder#roundedkendomvcuirounded) option accepts the following values: |
| 153 | + |
| 154 | +- `Rounded.Small`—Small form. |
| 155 | +- (Default) `Rounded.Medium`—Medium form. |
| 156 | +- `Rounded.Large`—Large form. |
| 157 | +- `Rounded.None`—Unset. |
| 158 | + |
| 159 | +The structure of the class is `k-rounded-{size}`. The default rounded value is `medium` and is applied to the rendered `div` element through the `k-rounded-md` class. |
| 160 | + |
| 161 | +```html |
| 162 | +<div class="k-chip k-rounded-md" > |
| 163 | +</div> |
| 164 | +``` |
| 165 | + |
| 166 | +## See Also |
| 167 | + |
| 168 | +* [Appearance Overview of the Telerik UI Helpers]({% slug components_rendering_overview %}) |
| 169 | +* [Appearance of the Chip HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/chip/appearance) |
| 170 | +* [Server-Side API of the Chip HtmlHelper for {{ site.framework }}](/api/chip) |
| 171 | +* [JavaScript API Reference of the Chip HtmlHelper for {{ site.framework }}](https://docs.telerik.com/kendo-ui/api/javascript/ui/chip) |
0 commit comments