MStyle
Component Library based on VueJS and Bootstrap 4
Instalation
npm install vue-mstyle
Using in your project
Component Syntax Description
MBanner
Banner title Button
<m-banner> properties:
bannerImage - url or path to image
bannerHeight - height of banner (default: 44rem)
bannerColor - color for overlay (default: black)
textAlign - alignment of text on the banner: left, center or right (default: center)
textColor - color of the text (default: white)
:opacity - overlay opacity value: 0 - transparent, 1 - opaque (default: 0.7)
MCaptcha
https://developers.google.com/recaptcha/docs/invisible
Based on google recaptcha See aditional information
<m-captcha> properties:
@response - event, emitted by m-captcha when captcha is passed. Returns captcha key, see google documentation
sitekey - mandatory parameter, google recaptcha data-sitekey
captchaType - type of captcha, invisible for invisible, normal for I'm not robot
MCard
Header text Title Some text here Some text here Some text here Button
<m-card> properties:
:radius - set border-radius property in pixels for rounded corners (default: 0)
background - set background color (default: white)
color - set text color (default: black)
<m-card-media> properties:
:radius - set border-radius property in pixels for top-left and top-right corners (default: 0)
background - set background color (default: #718F9E)
color - set text color (default: white)
MDataIterator
Data structure example:
items: name: "Frozen Yogurt" calories: 159 fat: 60 carbs: 24 protein: 40 sodium: 87 calcium: "14%" iron: "1%" name: "Ice cream sandwich" calories: 237 fat: 90 carbs: 37 protein: 43 sodium: 129 calcium: "8%" iron: "1%" name: "Eclair" calories: 262 fat: 160 carbs: 23 protein: 60 sodium: 337 calcium: "6%" iron: "7%" name: "Cupcake" calories: 305 fat: 37 carbs: 67 protein: 43 sodium: 413 calcium: "3%" iron: "8%" name: "Gingerbread" calories: 356 fat: 160 carbs: 49 protein: 39 sodium: 327 calcium: "7%" iron: "16%" name: "Jelly bean" calories: 375 fat: 00 carbs: 94 protein: 00 sodium: 50 calcium: "0%" iron: "0%"
<m-data-iterator> properties:
:data (Array) - array of objects which data will be added into data iterator
:itemsPerPage (Number) - number of visible items for each page (default: 1)
itemsPerPageText (String) - label for element where you can select number of items displayed on page (default: Items per page:)
backgroundHeader (String) - background color for header (default: #455A64)
colorHeader (String) - text color for header (default: white)
background (String) - background color for data iterator cards (default: white)
color (String) - text color for data iterator cards content (default: black)
MDataTable
Data structure example:
items: name: "Frozen Yogurt" calories: 159 fat: 60 carbs: 24 protein: 40 sodium: 87 calcium: "14%" iron: "1%" name: "Ice cream sandwich" calories: 237 fat: 90 carbs: 37 protein: 43 sodium: 129 calcium: "8%" iron: "1%" name: "Eclair" calories: 262 fat: 160 carbs: 23 protein: 60 sodium: 337 calcium: "6%" iron: "7%" name: "Cupcake" calories: 305 fat: 37 carbs: 67 protein: 43 sodium: 413 calcium: "3%" iron: "8%" name: "Gingerbread" calories: 356 fat: 160 carbs: 49 protein: 39 sodium: 327 calcium: "7%" iron: "16%" name: "Jelly bean" calories: 375 fat: 00 carbs: 94 protein: 00 sodium: 50 calcium: "0%" iron: "0%"
<m-data-table> properties:
:dataTable (Array) - array of objects which data will be added into table
:sortingEnabled (Boolean) - enable ascending and descending sorting table by columns (default: true)
:paginationEnabled (Boolean) - enable pagination of data from table (default: false)
:itemsPerPage (Number) - if paginationEnabled property is set to 'true' you can set the number of rows displayed on page (default: 1)
paginationAlign (String) - set position of the pagination on the page: left, center or right (default: left)
paginationColor (String) - set color of active page into pagination section (default: #718F9E)
dark (Boolean) - apply dark theme (default: false)
stripped (Boolean) - make the table stripped (default: false)
bordered (Boolean) - add border on the table (default: false)
hovered (Boolean) - rows will change color on hover (default: false)
<m-data-table-head> properties:
color (String) - set text color into table header
background (String) - set background color of the header
textAlign (String) - set alignment of the text: left, center or right (default: left)
textTransfrom (String) - apply text-transform property for header: lowercase, uppercase or capitalize (default: uppercase)
<m-data-table-body> properties:
color (String) - set text color into table body
background (String) - set background color of the rows
textAlign (String) - set alignment of the text: left, center or right (default: left)
MDialog
<!-- Dialog trigger button --> Show dialog <!-- Dialog component --> Modal header Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vestibulum sem vel tellus gravida, at bibendum lorem iaculis. Aenean sed turpis dignissim, commodo diam eu, dignissim tellus. In hac habitasse platea dictumst. Phasellus consectetur ultricies metus. Sed quis neque mi. Close
<m-dialog> properties:
id - id of the dialog component
size - size of the dialog window: small, normal or large (default: normal)
:centered (Boolean) - vertical alignment of the dialog in the center (default: false)
:persistent (Boolean) - set 'true' and dialog will doesn't close on click outside (default: false)
<m-dialog-header> properties:
background - background-color of dialog header (default: #718F9E)
color - text-color inside header section (default: white)
<m-dialog-body> properties:
background - background-color of dialog body (default: white)
color - color of body text (default: black)
align - text alignment inside body section: left, center, right or justify (default: left)
<m-dialog-footer> properties:
background - background-color of dialog footer (default: white)
color - text-color inside footer section (default: black)
MFooter
<!-- Footer with horizontal list in center section --> Company name Phone: 123 456 679 © 2018 All rights reserved <!-- Footer with vertical list in center section --> Company name Phone: 123 456 679 © 2018 All rights reserved
<m-footer> properties:
background - background color of the footer section (default: #718F9E)
height - height of the footer (default: auto)
<m-footer-left> properties:
color - text-color for elements placed on the left of the page (default: white)
<m-footer-center> properties:
color - text-color for elements placed in the center of the page (default: white)
<m-footer-right> properties:
color - text-color for elements placed on the right of the page (default: white)
<m-footer-list-horizontal> properties:
color - color for list items (default: white)
items (Array) - array of objects with properties: 'title', 'icon' and 'link'
<m-footer-list-vertical> properties:
name - name of the list (example: Social, Media)
color - color for list items (default: white)
items (Array) - array of objects with properties: 'title', 'icon' and 'link'
MFileUploader
<m-file-uploader> properties:
@loaded - event, emitted by m-file-loader when all dropped files are successful loaded
allowedFileType - type of files allowed to be droped in file loader. Default allowed type is .pdf
allowMultipleUpload - if is present, allows user to load multiple files
MNavbar
Brand Dropdown Language
<m-navbar> properties:
background - set navbar color (default: #718F9E)
<m-navbar-brand> properties:
color - set color for text (default: white)
:showButton (Boolean) - show or hide button wich expand navbar (default: true)
<m-navbar-items> properties:
:items (Array) - array of objects with properties 'title', 'link' for adding multiple items into navbar
color - set text color of items (default: white)
decoration - set items decoration on hover (default: underline)
Important: <m-navbar-items-right>
section is used for align items on right of the navbar
<m-navbar-item-link> properties:
:item (Object) - object with properties 'title', 'link' for adding single item into navbar
color - set text color of items (default: white)
decoration - set items decoration on hover (default: underline)
<m-navbar-item-action> properties:
:item (Object) - object with properties 'title', 'action' (name of the method called on click) for adding single item into navbar
color - set text color of items (default: white)
decoration - set items decoration on hover (default: underline)
<m-navbar-dropdown> properties:
dropdownId - set id for dropdown
color - set color for dropdown (default: white)
:dropdownItems (Array) - array of object with properties 'title', 'value' and 'icon' for adding items into dropdown
@selectedItem - event, emited when an item is clicked; here you can add your method for get the 'value' property of selected item
Important: <m-navbar-dropdown-right>
section is used for align dropdown on right of the navbar