Appearance
The DropDownButton
provides a predefined set of appearance options.
Apart from the default vision of the DropDownButton
, these alternative styling options enable you to configure each individual aspect of the component's appearance.
The current article provides details about how the component changes when the different configurations of its properties are applied. Here are the sections you can directly access:
- DropDownButton Configurator demo
- DropDownButton Sizes
- DropDownButton Shape
- DropDownButton Roundness
- DropDownButton Fill Mode
- DropDownButton Theme Colors
Configurator demo
The following example demonstrates configuring different aspects of a DropDownButton
appearance through a configurator.
Size
The size of the DropDownButton
is controlled through its size
property. The values we can pass to the property are as follows:
small
— Sets thepadding
to2px
and8px
.medium
(Default) — Sets thepadding
to4px
and8px
.large
— Sets thepadding
to6px
and8px
.null
— Passingnull
to thesize
property gives us the option to define acustom CSS class
that sets thepadding
of the DropDownButton.
The following example demonstrates the usage of each size
option:
Shape
The shape of the DropDownButton
is controlled through its shape
property. The values we can pass to the property are as follows:
rectangle
(Default) — Sets a shape based on therectangle
option.square
— Sets a shape based on thesquare
option.null
— Passingnull
to theshape
removes the built-in shape of the DropDownButton.
The following example demonstrates the usage of each shape
option:
Roundness
The roundness of the DropDownButton
is controlled through its rounded
property. The values we can pass to the property are as follows:
small
— Sets theborder radius
to1px
.medium
(Default) — Sets theborder radius
to2px
.
large
— Sets theborder radius
to4px
.
full
— Sets theborder radius
to9999px
.null
— Passingnull
to therounded
property gives us the option to define acustom CSS class
that defines theborder-radius
of the DropDownButton.
The following example demonstrates the usage of each rounded
option:
Fill Mode
The styling of the DropDownButton
is controlled through its fillMode
property. The values we can pass to the property are as follows:
solid
(Default) — Sets abackground
color andsolid borders
.flat
— Setstransparent background and borders
in default state, andbackground color
in focused state.outline
— Sets atransparent background
andsolid borders
.link
— Setstransparent background and borders
.null
— Passingnull
to thefillMode
property gives us the option to define acustom CSS class
that defines thebackground
andborder
of the DropDownButton.
The following example demonstrates the usage of each fillMode
option:
Theme Colors
The color of the DropDownButton
is controlled through its themeColor
property.
base
(Default) — The color of the DropDownButton will be based on thebase
theme color.primary
— The color of the DropDownButton will be based on theprimary
theme color.secondary
— The color of the DropDownButton will be based on thesecondary
theme color.tertiary
— The color of the DropDownButton will be based on thetertiary
theme color.info
— The color of the DropDownButton will be based on theinfo
theme color.success
— The color of the DropDownButton will be based on thesuccess
theme color.warning
— The color of the DropDownButton will be based on thewarning
theme color.error
— The color of the DropDownButton will be based on theerror
theme color.dark
— The color of the DropDownButton will be based on thedark
theme color.light
— The color of the DropDownButton will be based on thelight
theme color.inverse
— The color of the DropDownButton will be based on theinverse
theme color.null
— Passingnull
to thethemeColor
property gives us the option to define acustom CSS class
that sets the look of the DropDownButton.
The following example demonstrates the usage of each themeColor
option: