Skip to content

wiz-buttons

Use this component to create and handle actionable buttons in horizontal or vertical layouts, with customizable styles and alignment options.

Usage

Markup:

html
<wiz-buttons
  :items="[
    {
      name: 'Learn more',
      link: 'https://example.com',
      buttonColor: '#3498db',
      textAlign: 'center',
      width: 150,
    },
    {
      name: 'Contact us',
      link: 'https://example.com/contact',
      buttonColor: '#2ecc71',
      textAlign: 'center',
      width: 150,
    },
  ]"
  :align="'center'"
  :horizontal="true"
/>

The default itemTemplate:

txt
{
  borderFlag: false,
  borderColor: '#2573ba',
  borderWidth: 0,
  borderRadius: 0,
  buttonColor: '#2baadf',
  name: '<strong>Button</strong>',
  textAlign: 'center',
  link: 'https://example.com',
  width: 100,
  dataMsysLinkname: '',
}

The align property supports dynamic alignment adjustments:

txt
<wiz-buttons :align="'center'" />

wiz-buttons adapts to different screen sizes, ensuring buttons stack vertically on smaller screens using the following styles:

css
@media screen and (max-width: 480px) {
  .wiz-buttons {
    width: 100% !important;
  }
}

Properties


The following properties are available:
PropertyTypeDefault valueDescription
alignstringleftButton text alignment. One of: "center", "left", "right".
horizontalbooleantrueDefines buttons orientation. If "true", the buttons are displayed in a row. If "false", the buttons are displayed in a column.
itemsarray[...]Array of button objects containing properties like "name", "link", "buttonColor", "textAlign", and "width".
itemTemplateobjectfunction ()Defines default styles for buttons if specific properties aren't provided in the "items" array.
paddingLeftRightnumber20Left and right padding for buttons.
paddingTopBottomnumber15Top and bottom padding for buttons.