New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Appearance

In this article, you will find information about the rendering and styling options of the Telerik UI for ASP.NET MVC DropDownButton.

For a live example, refer to the Appearance Demo of the DropDownButton.

Options

The DropDownButton provides the following methods for styling:

  • Size()—configures the overall size of the component.
  • ThemeColor()—configures what color will be applied to the component.
  • FillMode()—defines how the color is applied to the component.
  • Rounded()—determines the border radius of the component.
  • ShowArrowButton()—shows an arrow indicator in the button.

Size

To control the size of the DropDownButton, configure the Size() method with any of the following values:

  • Small
  • Medium
  • Large
  • None

The default Size value is Medium.

    @(Html.Kendo().DropDownButton()
        .Name("DropDownButton")
        .Icon("clipboard")
        .Size(ComponentSize.Medium)
        .Items(items =>
        {
            items.Add().Id("keep-text").Text("Keep Text Only").Icon("clipboard-text");
            items.Add().Id("paste-html").Text("Paste as HTML").Icon("clipboard-code");
            items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("clipboard-markdown");
        })
    )

FillMode

To manipulate the fill mode of the DropDownButton, configure the FillMode() method with any of the following values:

  • Solid
  • Outline
  • Flat
  • None

The default FillMode value is Solid.

    @(Html.Kendo().DropDownButton()
        .Name("DropDownButton")
        .Icon("clipboard")
        .FillMode(FillMode.Solid)
        .Items(items =>
        {
            items.Add().Id("keep-text").Text("Keep Text Only").Icon("clipboard-text");
            items.Add().Id("paste-html").Text("Paste as HTML").Icon("clipboard-code");
            items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("clipboard-markdown");
        })
    )

ThemeColor

To specify the theme color of the DropDownButton, configure the ThemeColor() method with any of the following values:

  • Base
  • Primary
  • Secondary
  • Tertiary
  • Info
  • Success
  • Warning
  • Error
  • Dark
  • Light
  • Inverse

The default ThemeColor value is Base.

    @(Html.Kendo().DropDownButton()
        .Name("DropDownButton")
        .Icon("clipboard")
        .ThemeColor(ThemeColor.Base)
        .Items(items =>
        {
            items.Add().Id("keep-text").Text("Keep Text Only").Icon("clipboard-text");
            items.Add().Id("paste-html").Text("Paste as HTML").Icon("clipboard-code");
            items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("clipboard-markdown");
        })
    )

Rounded

To set the border radius of the DropDownButton, configure the Rounded() method with any of the following values:

  • Small
  • Medium
  • Large
  • Full
  • None

The default Rounded value is Medium.

    @(Html.Kendo().DropDownButton()
        .Name("DropDownButton")
        .Icon("clipboard")
        .Rounded(Rounded.Medium)
        .Items(items =>
        {
            items.Add().Id("keep-text").Text("Keep Text Only").Icon("clipboard-text");
            items.Add().Id("paste-html").Text("Paste as HTML").Icon("clipboard-code");
            items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("clipboard-markdown");
        })
    )

ShowArrowButton

Enable the ShowArrowButton() option to render a down arrow in the DropDownButton that opens and closes its popup. By default, the arrow indicator is not displayed.

    @(Html.Kendo().DropDownButton()
        .Name("DropDownButton")
        .Text("Paste")
        .ShowArrowButton(true)
        .Items(items =>
        {
            items.Add().Id("keep-text").Text("Keep Text Only").Icon("clipboard-text");
            items.Add().Id("paste-html").Text("Paste as HTML").Icon("clipboard-code");
            items.Add().Id("paste-markdown").Text("Paste Markdown").Icon("clipboard-markdown");
        })
    )

Rendering

To review the 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.

See Also

In this article