Button
- Usage
- Styling
Style Properties
The following style properties can be used in CSS stylesheets to customize the appearance of this component.
To apply values to these properties globally in your application UI, place them in a CSS block using the html {…}
selector.
See Lumo Style Properties for more information on style properties.
Common Properties
Feature | Property | Default Value |
---|---|---|
Background |
|
|
Text Color |
|
|
Font Weight |
|
|
Font Size |
|
|
Border |
|
|
Border Radius |
|
|
Padding |
|
|
Margin |
|
|
Height |
|
|
Min-Width |
|
|
Primary Button
Feature | Property | Default Value |
---|---|---|
Background |
|
|
Text Color |
|
|
Font Weight |
|
|
Border |
|
|
Tertiary Button
Feature | Property | Default Value |
---|---|---|
Background |
|
|
Text Color |
|
|
Font Weight |
|
|
Border |
|
|
Padding |
|
|
CSS Selectors
The following CSS selectors can be used in stylesheets to target the various parts and states of the component. See the Styling documentation for more details on how to style components.
- Root element
-
vaadin-button
States
- Disabled
-
vaadin-button
[disabled] - Focused
-
vaadin-button
[focused] - Keyboard Focused
-
vaadin-button
[focus-ring] - Hovered
-
vaadin-button
:hover - Hover Highlight
-
vaadin-button
:hover::before
Parts
- Label
-
vaadin-button
::part(label) - Prefix (e.g., icon) Wrapper
-
vaadin-button
::part(prefix) - Suffix (e.g., icon) Wrapper
-
vaadin-button
::part(suffix) - Icon
-
vaadin-button
> vaadin-icon
Style Variants
- Primary
-
vaadin-button
[theme~="primary"] - Secondary (default)
-
vaadin-button
:not([theme]) - Tertiary
-
vaadin-button
[theme~="tertiary"] - Tertiary Inline
-
vaadin-button
[theme~="tertiary-inline"] - Icon-Only
-
vaadin-button
[theme~="icon"] - Small
-
vaadin-button
[theme~="small"] - Large
-
vaadin-button
[theme~="large"] - Contrast
-
vaadin-button
[theme~="contrast"] - Success
-
vaadin-button
[theme~="success"] - Danger / Error
-
vaadin-button
[theme~="error"] - Warning
-
vaadin-button
[theme~="warning"]