1.0.22 • Published 3 years ago

vue-minicss v1.0.22

Weekly downloads
26
License
MIT
Repository
github
Last release
3 years ago

Vue Minicss

alt Vue Minicss Logo

A components progressive library base on minicss.org for Vuejs.

The documentation and examples are being building here. Best and new components and features are coming. Feel free to make a pull request.

Author

This library is created by Aarón Montes. Support me to improve and maintain this library. My first month goal is only $50:

Instalation

NPM:

npm install --save vue-minicss

Import in your main.js (or index.js) file and install it:

// ES6
...
import VueMiniCss 'vue-minicss';

Vue.use(VueMiniCss);
...

Components

Note: All the components can receive the class, style or id as props.

Accordion

A component to show expandables items. Usage

...
<m-accordion :items="items" />
...

Props

NameDescriptionRequiredDefault
itemsArray of string or object containing the definition of the expandable items. E.g. 'Item 1', 'Item 2'... or {name: 'item1', label : 'Item 1'}True
expandAllBoolean to indicate if it's possible to expand all items at same timeFalsefalse

Slots

NameDescription
name or labelSlots with the name or label of the item to customize the item shown when expand

Box Colored

A component to display a blue box that occupies the entire available width.

Usage

...
<m-box-colored  />
...

Button

Component to render a clickable button

Usage

...
<m-button>
	...
</m-button>
...

Props

NameDescriptionRequiredDefault
inverseBoolean to indicate when button is darkFalsefalse
colorString to set button color. Values allowed are primary, secondary or tertiaryFalse
sizeString to indicate the button size. Small and large are allowed valuesFalse
hoverEffectBoolean to indicate a little effect when over the buttonFalsetrue
shadowedBoolean to indicate when button is shadowedFalsefalse
roundedBoolean to indicate when button has rounded edgesFalsefalse
circularBoolean to indicate when button is rounded or elipticalFalsefalse
borderedBoolean to indicate when button has a borderFalsefalse
loadingBoolean to indicate when button is loading. Show a spinner when is trueFalsefalse
disabledBoolean to indicate when button is disabledFalsefalse
widthInteger number to set the button withFalse75

Slots

NameDescription
DefaultSlots by default

Events

NameDescription
ClickEvent triggered when click

Cards

Card Section

Component to use into cards to separate content.

Usage

...
<m-card-section>
	...
</m-card-section>
...

Slots

NameDescription
DefaultSlot by default

Card

Component to render a card.

Usage

...
<m-card>
	...
</m-card>
...

Props

NameDescriptionRequiredDefault
sizeString to indicate the card size. Small and large are allowed valuesFalse
variantString to indicate the card status. Values allowed are error and warningFalse
fluidBoolean to indicate when its width based on the column that contains them

Slots

NameDescription
DefaultSlot by default

Drawer

Component to show a drawer and its button into the screen.

Usage

...
<m-drawer>
	...
</m-drawer>
...

Props

NameDescriptionRequiredDefault
idString to unique identify the drawerTrue
persistentBoolean to indicate when the drawer will be on right side. Otherwise, will render the drawer over the trigger buttonFalsetrue

Slots

NameDescription
DefaultSlot by default

Dropdown

Component to show a dropdown menu over a component.

Usage

...
<m-dropdown>
	....
	<template name="dropdown">
		...
	</template>
</m-dropdown>
...

Props

NameDescriptionRequiredDefault
hoverBoolean value to indicate when dropdown is show on hover eventFalsetrue

Slots

NameDescription
DefaultSlot by default
dropdownSlot to place the body of dropdown menu

Grid

Contanier

Component to define a default container

Usage

...
<m-container>
	...
</m-container>
...

Slots

NameDescription
DefaultSlot by default

Row

Use to define a new row on a grid design

Usage

...
<m-row>
	...
</m-row>
...

Slots

NameDescription
DefaultSlot by default

Cols

Use to define a new column on a grid design

Usage

...
<m-col>
	...
</m-col>
...

Props

NameDescriptionRequiredDefault
smString or integer number to indicate the number of row on a small screenFalse
mdString or integer number to indicate the number of row on a medium screenFalse
lgString or integer number to indicate the number of row on a large screenFalse
smOffsetString or integer number to indicate the offset for a row on a small screenFalse
mdOffsetString or integer number to indicate the offset for a row on a medium screenFalse
lgOffsetString or integer number to indicate the offset for a row on a large screenFalse

Slots

NameDescription
DefaultSlot by default

Header & Footer

Header

Component to show a header navbar.

Usage

...
<m-header>
	....
	<template name="logo">
		...
	</template>
</m-header>
...

Props

NameDescriptionRequiredDefault
stickyBoolean value to indicate when header is stickyFalsefalse

Slots

NameDescription
DefaultSlot by default
logoSlot to place a logo on header

Footer

Component to show a footer bar.

Usage

...
<m-footer>
	...
</m-footer>
...

Props

NameDescriptionRequiredDefault
stickyBoolean value to indicate when footer is stickyFalsefalse

Slots

NameDescription
DefaultSlot by default

Highlight

Component to higlight a component (usually text).

Usage

...
<m-highlight>
	...
</m-highlight>
...

Props

NameDescriptionRequiredDefault
tagBoolean value to indicate when highlight is a tag. A tag means rounded cornersFalsefalse
inlineBoolean value to indicate when highlight is inline with the rest of textFalsefalse
colorString to set highlight color. Values allowed are primary, secondary or tertiaryFalse

Slots

NameDescription
DefaultSlot by default

Icons

Component to show an icon. Its's based on Feather Icons. You can find the whole list of icons here.

Usage

...
<m-icon name="icon-name">
	...
</m-icon>
...

Props

NameDescriptionRequiredDefault
nameString to indicate the icon to showTrue
widthInteger number to indicate the icon widthFalse24
heightInteger number to indicate the icon heightFalse24
colorString (with an hexadecimal value) to indicate the icon colorFalse#000000

Images

Images

Component to show images

Usage

...
<m-image :src="src">
	...
</m-image>
...

Props

NameDescriptionRequiredDefault
srcString to indicate the source of the imageTrue
altString to define an alternative text for the imageFalse
captionString to define a footer image textFalse
innerClassString to define a class for the image HTML tag inside the componentFalse
widthString or integer number to indicate the image widthFalse240
heightString or integer number to indicate the image heightFalse240

Hoverable Images

Component to show images and show and opacity when hover it.

Usage

...
<m-hoverable-image :src="src">
	...
</m-hoverable-image>
...

Props

NameDescriptionRequiredDefault
srcString to indicate the source of the imageTrue
altString to define an alternative text for the imageFalse
innerClassString to define a class for the image HTML tag inside the componentFalse
widthString or integer number to indicate the image widthFalse240
heightString or integer number to indicate the image heightFalse240
bodyColorString with an hexadecimal to indicate the body color when hoverFalsetransparent

Slots

NameDescription
DefaultSlot by default

Parallax

Component to show images and show and opacity when hover it.

Usage

...
<m-parallax :src="src" />
...

Props

NameDescriptionRequiredDefault
srcString to indicate the source of the imageTrue
heightString to define the parallax heightFalse

Inputs

Fieldset

Component to render a frame around other elements.

Usage

...
<m-fieldset>
...
</m-fieldset>
...

Props

NameDescriptionRequiredDefault
LegendString to put a legend or title for the frameTrue

Slots

NameDescription
DefaultSlot by default

Checkbox

Componente to show a checkbox.

Usage

...
<m-checkbox v-model="value" :label="label">
...
</m-checkbox>
...

Props

NameDescriptionRequiredDefault
valueString to indicate when the checkbox is chekedFalse
labelString to define the checkbox labelFalse
disabledBoolean to indicate when the checkbox is disabledFalsefalse
formString to indicate the name of the form to which it belongsFalse
nameString to indicate the name for checkboxFalse
readonlyBoolean to indicate when the checkbox is readonlyFalsefalse
invalidBoolean value that indicates when the control value is invalid or requiredFalsefalse

Slots

NameDescription
DefaultSlot by default

Events

NameDescription
inputEvent triggered when the checkbox value changed

Note: You can use v-model with this component.

File

Component to show a button and select a file from a prompt

Usage

...
<m-file v-model="value" />
...

Props

NameDescriptionRequiredDefault
idString to indicate the unique identifier for the componentTrue
valueString used by v-model directive to pass the base64 file stringFalse
showLabelBoolean to indicate when to show the name of file selectedFalsefalse
acceptString to indicate the file extensions for inputFalse
smallString to indicate when the button is small or notFalsetrue

Events

NameDescription
inputEvent triggered when select a file

Note: You can use v-model with this component.

Input

Component to show a input or textbox

Usage

...
<m-input v-model="value" />
...

Props

NameDescriptionRequiredDefault
valueString or number to indicate the input valueFalse
typeString to indicate the input type. Allowed values are text, number, email, search, password, tel and urlTrue
disabledBoolean to indicate when the input is disableFalsefalse
formString to indicate the name of the form to which it belongsFalse
maxString or integer number to indicate the maximun for inputs type numberFalse
maxlengthString or integer number to specify the maximum number of characters allowed on inputFalse
minString or integer number to indicate the minimum for type numberFalse
minlengthString or integer number to specify the minimum number of characters allowed on inputTrue
nameString to specify the name of the inputFalse
patternRegex used the validate the input value when submitFalse
placeholderString to specify a short hint that describes the expected value of the inputFalse
readonlyBoolean to indicate when the input is readonlyFalse
stepString or integer number to specify the interval between legal numbers on inputFalse
invalidBoolean value that indicates when the control value is invalid or required. Put a red border around inputFalse

Events

NameDescription
blurEvent triggered when input lost focus
changeEvent triggered when input changes its value
focusEvent triggered when input got focus
keydownEvent triggered when you press a key down
keypressEvent triggered when you press a key
keyupEvent triggered when you release a key
clickEvent triggered when you click on input
inputEvent triggered when input value changes

Note: You can use v-model with this component.

Radio

Component to show inputs type radio

Usage

...
<m-radio v-model="value" :items="items" />
...

Props

NameDescriptionRequiredDefault
valueString or number to indicate the input valueFalse
itemsArray of object containing the items to render for radios. E.g. {id: 'id', label': 'label', value: 'value'},...True
disabledBoolean to indicate when the radios are disableFalsefalse
readonlyBoolean to indicate when the radios are readonlyFalsefalse
invalidBoolean value that indicates when the control value is invalid or required. Put a red border around inputFalsefalse
verticalBoolean value to indicate when the input radios are shown verticallyFalsefalse

Events

NameDescription
changeEvent triggered when checkbox changes its value
inputEvent triggered when checkbox changes its value

Note: You can use v-model with this component.

Select

Component to show select control

Usage

...
<m-select v-model="value" :options="items" />
...

Props

NameDescriptionRequiredDefault
valueString or number to indicate the input valueFalse
optionsArray of object containing the items for select options. E.g. { label': 'label', value: 'value'},...True
disabledBoolean to indicate when the select control is disableFalsefalse
formString to indicate the name of the form to which it belongsFalse
nameString to specify the name of the select controlFalse
readonlyBoolean to indicate when the select control is readonlyFalsefalse
invalidBoolean value that indicates when the control value is invalid or required. Put a red border around inputFalsefalse
placeholderString to specify a short hint that describes the expected value when you make a selectionFalse

Events

NameDescription
changeEvent triggered when checkbox changes its value
inputEvent triggered when checkbox changes its value

Note: You can use v-model with this component.

Textarea

Component to show a textarea

Usage

...
<m-textarea v-model="value" />
...

Props

NameDescriptionRequiredDefault
valueString or number to indicate the textarea valueFalse
disabledBoolean to indicate when the textarea is disableFalsefalse
formString to indicate the name of the form to which it belongsFalse
maxlengthString or integer number to specify the maximum number of characters allowed on textareaFalse
nameString to specify the name of the inputFalse
placeholderString to specify a short hint that describes the expected value of the textareaFalse
autofocusBoolean to indicate when the input is focused from the beginingFalse
rowsString or integer number of rows for the texte areaFalse
colsString or integer number of columns for the texte areaFalse
invalidBoolean value that indicates when the control value is invalid or required. Put a red border around inputFalse

Events

NameDescription
blurEvent triggered when textarea lost focus
changeEvent triggered when textarea changes its value
focusEvent triggered when textarea got focus
keydownEvent triggered when you press a key down
keypressEvent triggered when you press a key
keyupEvent triggered when you release a key
clickEvent triggered when you click on textarea
inputEvent triggered when textarea value changes

Note: You can use v-model with this component.

Modals

Loading

Component to show a little loading modal over the main screen. It has a slot to put other components inside it.

Usage

...
<m-loading :show="show">
...
</m-loading>
...

Props

NameDescriptionRequiredDefault
showBoolean value to indicate when to show the loading modalFalsefalse

Slots

NameDescription
DefaultSlot by default

Modal

Component to show a modal window over main screen.

Usage

...
<m-modal v-model="show">
...
</m-modal>
...

Props

NameDescriptionRequiredDefault
valueBoolean value to indicate when to show the modalFalsefalse

Note: You can use v-model with this component.

Slots

NameDescription
DefaultSlot by default
headerSlot to customize the modal header

Events

NameDescription
inputEvent triggered when click on close button

ProgressBar

Component to show a progress bar.

...
<m-spinner>
	...
</m-spinner>
...

Props

NameDescriptionRequiredDefault
colorString to set button color. Values allowed are primary, secondary or tertiaryFalse
valueString or integer number to indicate the progress bar valueFalse0
maxString or integer number to indicate the max value for progress barFalse100

Spinner

Component to show a loading spinner icon Usage

...
<m-progress-bar>
</m-progress-bar>
...

Props

NameDescriptionRequiredDefault
colorString to set button color. Values allowed are primary, secondary or tertiaryFalse

Table

Component to show a table

Usage

...
<m-table :headers="headers" :items="items">
	...
</m-table>
...

Props

NameDescriptionRequiredDefault
headersArray of string to indicate the table headers. E.g. 'Column 1', 'Column 2'...True
itemsArray of object containing the items to render on the table. There must be a match with the table headers. E.g. {'Column 1': value1, 'Column 2': value 2}True
searchString to indicate a search over the table itemsFalse
horizontalBoolean to indicate when table will be show horizontallyFalsefalse
stripedBoolean to indicate when table is stripedFalsefalse
hoverableBoolean to indicate when table has other color when hover a rowFalsefalse
selectableBoolean to indicate when is possible to select a rowFalsefalse
denseBoolean to indicate when table is denseFalsefalse
noItemsTextString to indicate a message when any items were found on a searchFalse

Slots

NameDescription
titleSlots to place a title
searchSlots to place a search textbox
header-{index}Slots to customize a header. Index begins on 0
row-{header}Slots to customize a cell under a header on a row

Events

NameDescription
item-clickEvent triggered when click on a row and it's selectable

Tabs

Component to render a card.

Usage

...
<m-card>
	...
</m-card>
...

Props

NameDescriptionRequiredDefault
tabsArray of string containing the tab titlesTrue
valueInteger number to indicate the current tab shownFalse0

Slots

NameDescription
tab-header-{index}Slot to show the header of the N tab. By default has the tab title. Index begin on 1
tab-content-{index}Slot to show the content of the N tab. Index begin on 1

Events

NameDescription
InputEvent triggered when change tab

Note: You can use v-model with this component.

Toast

Component to show a toast message on screen bottom Usage

...
<m-toast>
	...
</m-toast>
...

Props

NameDescriptionRequiredDefault
valueBoolean to indicate when to show toastTruefalse
timeoutInteger number to indicate the miliseconds on screenFalse2500

Events

NameDescription
InputEvent triggered when toast dissaper

Note: You can use v-model with this component.

Slots

NameDescription
DefaultSlot by default

Tooltip

Component to show a tooltip when pass over a HTML element or component

Usage

...
<m-tooltip tooltip-text="My tooltip">
	...
</m-tooltip>
...

Props

NameDescriptionRequiredDefault
tooltipTextString to use as tooltipTrue
bottomBoolean to indicate when tooltip is shown on bottomFalsefalse

Slots

NameDescription
DefaultSlot by default

License

MIT

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago