Button

The silk:Button tag generates a button stylized with Bootstrap.

Tag Use

Used standalone:

<silk:Button
  id=""
  label=""
  targetPage=""
  icon=""
  dock=""
  width=""
  cssClass="btn-primary"
  cssStyle=""
  renderIf=""
  extraProperties=""
  group="false"
  confirmTitle=""
  confirmMessage=""
  confirmLabel=""
  confirmIcon=""
  toggleList=""
/>

Used as a container:

Properties

*Required property.

id

The button's unique identifier. If the button's events are not going to be used the id is not required. Default Value: Empty.

label

The text used as the button's label. Not require if the button will only show an icon. Default Value: Empty.

targetPage

The page's identifier which will be selected/show when the button is clicked. This also works with silk:Modals. If opening a page/modal is the only button's functionality then an id is not necessary. Default Value: Empty.

icon

The icon class from a Font Awesome icon. If the icon value is "insert" a plus icon will be added. If the icon value is "update" a pencil icon will be added. If the icon value is "delete" a trash can will be added. Default Value: Empty.

dock

The button's location if contained in a silk:header component. The values are: left, center, right. Default Value: Empty.

width

Sets the button's fixed width. By default the button's width will changed based on their content. Default Value: Empty.

cssClass

The classes to stylized the button. It expects Bootstrap classes. The button already has the "btn" class and is initialized with "btn-primary". Default Value: btn-primary.

cssStyle

To add extra styling using CSS styling elements. Default Value: Empty.

renderIf

The logic sentence which will define if the button should be rendered. The explanation on how to use the logic statement is found in Server Code Logic documentation. Default Value: Empty.

extraProperties

To add extra HTML properties not defined by the silk:Button component. Default Value: Empty.

group

Adds Bootstrap classes to group the button. Default Value: false.

confirmTitle

Sets the title of the confirmation dialog. Default Value: Empty.

confirmMessage

Sets the message showed in the confirmation dialog. Default Value: Empty.

confirmLabel

Sets the label for the accept button in the confirmation dialog. Default Value: Empty.

confirmIcon

Sets the confirmation dialog icon. Default Value: Empty.

toggleList

The list of comma separated elements which will be toggle together with the component. The value "parent" toggles the immediate parent element. The value "grandpa" toggles the grandparent element. Default Value: Empty.