You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/chiplist/appearance.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,24 +10,28 @@ position: 35
10
10
11
11
# ChipList Appearance Settings
12
12
13
-
You can control the appearance of the chips in the ChipList by setting the following attributes:
13
+
You can control the appearance of the chips in the ChipList by setting the following parameters:
14
14
15
-
*[FillMode](#fillmode)
16
-
*[Rounded](#rounded)
17
-
*[Size](#size)
15
+
*[`FillMode`](#fillmode)
16
+
*[`Rounded`](#rounded)
17
+
*[`Size`](#size)
18
18
19
19
You can use all of them together to achieve the desired appearance. This article will explain their effect one by one.
20
20
21
+
Also see how to set [`ThemeColor`](slug:chip-appearance#themecolor) and [`FillMode`](slug:chip-appearance#fillmode) separately for each [chip in the ChipList](slug:chiplist-bound).
22
+
21
23
## FillMode
22
24
23
-
The `FillMode` controls how the individual chip is filled. You can set it to a member of the `Telerik.Blazor.ThemeConstants.Chip.FillMode` class:
25
+
The `FillMode` controls how all the chips are filled. You can set it to a member of the `Telerik.Blazor.ThemeConstants.Chip.FillMode` class:
24
26
25
27
| Class members | Manual declarations |
26
28
|------------|--------|
27
29
|`Solid` <br /> default value|`solid`|
28
30
|`Outline`|`outline`|
29
31
30
-
>caption The built-in Fill modes
32
+
You can also set `FillMode` separately for each chip in the ChipList through a [property of the data item](slug:chiplist-bound).
33
+
34
+
>caption Using ChipList FillMode
31
35
32
36
````RAZOR
33
37
@* These are all built-in fill modes *@
@@ -86,7 +90,7 @@ The `Rounded` parameter applies the `border-radius` CSS rule to the chip to achi
86
90
|`Large`|`lg`|
87
91
|`Full`|`full`|
88
92
89
-
>caption The built-in values of the Rounded attribute
93
+
>caption Using ChipList Rounded
90
94
91
95
````RAZOR
92
96
@* The built-in rounded edges of the chip. *@
@@ -144,7 +148,7 @@ You can increase or decrease the size of the chips by setting the `Size` paramet
144
148
|`Medium` <br /> default value |`md`|
145
149
|`Large`|`lg`|
146
150
147
-
>caption The built-in chip sizes
151
+
>caption Using ChipList Size
148
152
149
153
````RAZOR
150
154
@{
@@ -191,3 +195,7 @@ You can increase or decrease the size of the chips by setting the `Size` paramet
Copy file name to clipboardExpand all lines: components/chiplist/data-bind.md
+98-57Lines changed: 98 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,112 +16,153 @@ This article explains how to provide data to a ChipList component, and the prope
16
16
17
17
## Data Binding Features
18
18
19
-
The ChipList has features that map to properties in the component model class. The following example uses property names that will work automatically, with no additional ChipList configuration.
19
+
The ChipList has features that map to properties in the component model class.
20
+
21
+
### Schema
22
+
23
+
The table below lists the available data binding parameters for the Blazor ChipList component. Use them when your model property names are different from the default values.
24
+
25
+
| ChipList Parameter | Default Value | Description |
26
+
|----------|----------|----------|
27
+
|`DisabledField`|`"Disabled"`| Defines if the chip is disabled (non-clickable). |
28
+
|`FillModeField`|`"FillMode"`| Defines the [`FillMode` of each chip](slug:chip-appearance#fillmode). |
29
+
|`IconField`|`"Icon"`| The icon that renders in the chip. See [Icons](#icons) below. |
30
+
|`RemovableField`|`"Removable"`| Defines if the users can remove the chip. |
31
+
|`TextField`|`"Text"`| The text that renders in the chip. |
32
+
|`ThemeColorField`|`"ThemeColor"`| Defines the [`ThemeColor` of each chip](slug:chip-appearance#themecolor). |
33
+
34
+
#### Icons
35
+
36
+
The `IconField` model property can hold:
37
+
38
+
* A property of the static `SvgIcon` class;
39
+
* A member of the `FontIcon` enum;
40
+
* A `string` that is a CSS class for a custom icon.
public string FillMode { get; set; } = string.Empty;
97
+
public object? Icon { get; set; }
56
98
public bool Removable { get; set; }
99
+
public string Text { get; set; } = string.Empty;
100
+
public string ThemeColor { get; set; } = string.Empty;
57
101
}
58
102
}
59
103
````
60
104
61
-
### Data Binding Schema
105
+
### Custom Property Names
62
106
63
-
The table below lists the available data binding parameters for the Blazor ChipList component. Use them when your model property names are different from the default values.
64
-
65
-
| ChipList Parameter | Default Value | Description |
66
-
|----------|----------|----------|
67
-
|`DisabledField`|`"Disabled"`| Defines if the chip is disabled (non-clickable). |
68
-
|`IconField`|`"Icon"`| The icon that renders in the chip. |
69
-
|`TextField`|`"Text"`| The text that renders in the chip. |
70
-
|`RemovableField`|`"Removable"`| Defines if the users can remove the chip. |
71
-
72
-
#### Icons
73
-
74
-
The `IconField` model property can hold:
75
-
76
-
* A property of the static `SvgIcon` class;
77
-
* A member of the `FontIcon` enum;
78
-
* A `string` that is a CSS class for a custom icon.
Copy file name to clipboardExpand all lines: components/chiplist/overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ The <a href="https://www.telerik.com/blazor-ui/chiplist" target="_blank">Blazor
52
52
53
53
## Data Binding
54
54
55
-
The Blazor ChipList requires a data source so that it can display items to the user. To provide a data source, use the `Data` property. [Read more about the Blazor ChipList data binding](slug:chiplist-bound).
55
+
The Blazor ChipList requires a data source so that it can display items to the user. To provide a data source, use the `Data` property. Some properties of the ChipList model can enhance the behavior and appearance of each chip. [Read more about the Blazor ChipList data binding](slug:chiplist-bound).
56
56
57
57
## Selection
58
58
@@ -68,7 +68,7 @@ You can use the built-in events of the Blazor ChipList to react to chip selectio
68
68
69
69
## Appearance
70
70
71
-
You can customize the appearance of the Blazor ChipList via a variety of built-in customization options. [Read more about the ChipList appearance settings...](slug:chiplist-appearance)
71
+
You can customize the [appearance of the Blazor ChipList](slug:chiplist-appearance) via a variety of built-in customization options. Also see how to set [`ThemeColor`](slug:chip-appearance#themecolor) and [`FillMode`](slug:chip-appearance#fillmode) separately for each [chip in the ChipList](slug:chiplist-bound).
72
72
73
73
## ChipList Parameters
74
74
@@ -82,7 +82,7 @@ The table below lists the ChipList parameters. Also check the [ChipList API Refe
82
82
|`AriaLabelledBy`|`string`| Maps to the `area-labelledby` attribute. Use this parameter to reference another element to define its accessible name. |
83
83
|`Class`|`string`| An additional CSS class for the `<div class="k-chip-list">` element. Use it to [customize the component styles and override the theme](slug:themes-override). |
84
84
|`Data`|`IEnumerable<TItem>`| The collection of the items that will be rendered as chips. |
85
-
|`Removable`|`bool`| Specifies if the chip can be removed by the user. If set to `true` a remove icon will be rendered on each available chip. |
85
+
|`Removable`|`bool`| Specifies if the chips can be removed by the user. If set to `true` a remove icon will be rendered on each available chip. |
86
86
|`RemoveIcon`|`object`| Defines the icon that will be rendered if the `Removable` parameter is set to `true`. |
0 commit comments