Introduction

Well, you know what a button is.:

The way to declare it is as follows:

  • Fluent
  • Declarative

Button.builder()
    .label("Do something")
    .build()

TBD

Available properties

This is the list of available properties for a button:

PropertyDescriptionNotes
idid for this component
cssClasseslist of css classescontent of the css attribute
styleinline style attributescontent of the style attribute
labelbutton label
iconOnLefticon key
iconOnRighticon key
imageimage url
colorone of success, error, contrast, normal
primarytrue/false
autofocustrue/false
disabledtrue/false
actionIdaction id
actionablecombination of id, label, action id and path
runnablea java runnable
callablea java callable

You can see a full explanation of those properties at https://vaadin.com/docs/latest/components/button