Appearance
In this article, you will find information about the styling options and rendering of the Telerik UI for ASP.NET MVC MultiSelect.
For a live example, visit the Appearance Demo of the MultiSelect.
Options
The MultiSelect supports the following styling options:
-
Size
—configures the overall size of the component. -
Rounded
—configures the border radius of the component. -
FillMode
—configures how the color is applied to the component.
Size
The Size
option controls the size of the MultiSelect. The k-input-{size}
class, which is applied to the wrapping span element of the MultiSelect, reflects the value of the Size
option.
The following values are available for the Size
option:
-
Small
—small size (applies thek-input-sm
class to the wrapping span element) -
Medium
—medium size (applies thek-input-md
class to the wrapping span element) -
Large
—large size (applies thek-input-lg
class to the wrapping span element) -
None
—unset.
The following example demonstrates how to set Size
in the declaration of the MultiSelect:
@(Html.Kendo().MultiSelect()
.Name("multiselect")
.DownArrow()
.Placeholder("Select...")
.Size(ComponentSize.Large)
.BindTo(new List<SelectListItem>()
{
new SelectListItem() {
Text = "Item1", Value ="1"
},
new SelectListItem() {
Text = "Item2", Value ="2"
},
new SelectListItem() {
Text = "Item3", Value ="3"
}
})
)
The default size value is Medium
and it is applied to the span
wrapping element through the k-input-md
class.
Below is the HTML of the MultiSelect that is affected from the Size
configuration. The changes are applied to the span.k-multiselect
wrapping element and to the span.k-chip
elements:
<span class="k-multiselect k-input k-multiselect-clearable k-input-lg">
...
<span class="k-chip k-chip-lg k-rounded-lg k-chip-solid k-chip-solid-base" aria-setsize="2"></span>
</span>
Rounded
The Rounded
option controls the border radius of the MultiSelect. The class that corresponds to the Rounded
option is k-rounded-{rounded}
.
The following values are available for the Rounded
option:
-
Small
—small border radius (applies thek-rounded-sm
class to the wrapping span element) -
Medium
—medium border radius (applies thek-rounded-md
class to the wrapping span element) -
Large
—large border radius (applies thek-rounded-lg
class to the wrapping span element) -
Full
—largest (ellipse-like) border radius (applies thek-rounded-full
class to the wrapping span element) -
None
—unset.
The following example demonstrates how to set Rounded
in the declaration of the MultiSelect:
@(Html.Kendo().MultiSelect()
.Name("multiselect")
.DownArrow()
.Placeholder("Select...")
.Rounded(Rounded.Medium)
.BindTo(new List<SelectListItem>()
{
new SelectListItem() {
Text = "Item1", Value ="1"
},
new SelectListItem() {
Text = "Item2", Value ="2"
},
new SelectListItem() {
Text = "Item3", Value ="3"
}
})
)
The default rounded value is Full
. It applies the k-rounded-full
class to the span.k-multiselect
wrapping element that contains the HTML of the component. The class is also applied to the span.k-chip
element which contains the HTML of the tags.
The rendering of the MultiSelect with Rounded.Medium
set:
<span class="k-multiselect k-input k-multiselect-clearable k-input-solid k-input-lg k-rounded-md">
...
<span class="k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base" aria-setsize="2"></span>
</span>
FillMode
The FillMode
option controls how the color of the tags is applied. The structure of the class is k-input-{fillMode}
.
The following values are available for the FillMode
option:
-
Solid
—applies thek-input-solid
class to the wrapping span element -
Flat
—applies thek-input-flat
class to the wrapping span element -
Outline
—applies thek-input-outline
class to the wrapping span element -
None
—unset.
The default value is Solid
and it is applied to the span.k-multiselect
wrapping element through the k-input-solid
class and to the span.k-chip
elements through the .k-chip-solid .k-chip-solid-base
classes.
The following example demonstrates how to set FillMode
in the declaration of the MultiSelect:
@(Html.Kendo().MultiSelect()
.Name("multiselect")
.DownArrow()
.Placeholder("Select...")
.FillMode(FillMode.Outline)
.BindTo(new List<SelectListItem>()
{
new SelectListItem() {
Text = "Item1", Value ="1"
},
new SelectListItem() {
Text = "Item2", Value ="2"
},
new SelectListItem() {
Text = "Item3", Value ="3"
}
})
)
The FillMode.Outline
value is reflected through the respective classes applied to the span.k-multiselect
wrapping element and to the span.k-chip
elements:
<span class="k-multiselect k-input k-multiselect-clearable k-input-outline k-input-lg k-rounded-md">
...
<span class="k-chip k-chip-lg k-rounded-md k-chip-outline k-chip-outline-base" aria-setsize="2"></span>
</span>
Rendering
Starting with version R1 2022, the component has a new rendering. For additional information on the decision behind these changes, visit the Components Rendering Overview article.
To review the latest rendering of the component, refer to the HTML specifications in the Kendo UI Themes Monorepo. The tests
folder of the repository contains the rendering for all flavors of the components, providing a clear reference for how their elements are structured. The rendering information can help you customize a component's appearance and behavior by applying custom CSS or JavaScript to suit specific design or functional requirements.