@vue-interface/variant
Variant
A mixin that adds contextual variations to components. This usually deals with the color or the way a component is displayed. This mixin is inherited by many components.
[[toc]]
Installation
NPM
npm i @vue-interface/variant
Yarn
yard add @vue-interface/variant
Options
variant
- Type:
string - Default:
primary
The default component variant.
variantPrefix
- Type:
string - Default:
kebabCase(this.$options.name)
The variant prefix. By default, the kebab component name is used.
variantClass
- Type:
string - Default:
prefix(this.variant, this.variantPrefix)
variantClassPrefix
- Type:
string - Default:
kebabCase(this.variantPrefix)
The computed variant class prefix.
Tailwindcss
Plugin
If you want to include Alerts in your Tailwindcss build, then intall the plugin.
module.exports = {
plugins: [
require('@vue-interface/variant/tailwind')
]
};
Theme
These are the default values. Only override what you need.
module.exports = {
theme: {
variations: {
primary: theme('colors.blue.500', '#9E9E9E'),
secondary: theme('colors.gray.600', '#718096'),
danger: theme('colors.red.600', '#E53E3E'),
success: theme('colors.green.500', '#48BB78'),
warning: theme('colors.orange.500', '#ED8936'),
info: theme('colors.teal.400', '#68D391'),
dark: theme('colors.gray.800', '#2D3748'),
light: theme('colors.gray.100', '#F7FAFC'),
muted: theme('colors.white', '#FFF')
}
}
}
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.3.1 | ^2.6.14 | ISC | |
| 1.3.0 | ^2.6.14 | ISC | |
| 1.2.1 | ^2.6.14 | ISC | |
| 1.2.0 | ^2.6.14 | ISC | |
| 1.1.8 | ^2.6.14 | ISC | |
| 1.1.7 | ^2.6.14 | ISC | |
| 1.1.6 | ^2.6.14 | ISC | |
| 1.1.5 | ^2.6.14 | ISC | |
| 1.1.4 | ^2.6.14 | ISC | |
| 1.1.3 | ^2.6.14 | ISC | |
| 1.1.2 | ^2.6.14 | ISC | |
| 1.1.1 | ^2.6.14 | ISC | |
| 1.1.0 | ^2.6.14 | ISC | |
| 1.0.17 | ISC | ||
| 1.0.16 | ISC | ||
| 1.0.15 | ISC | ||
| 1.0.14 | ISC | ||
| 1.0.13 | ISC | ||
| 1.0.12 | ^2.6.11 | ISC | |
| 1.0.11 | ^2.6.11 | ISC | |
| 1.0.10 | ^2.6.11 | ISC | |
| 1.0.9 | ^2.6.11 | ISC | |
| 1.0.8 | ^2.6.11 | ISC | |
| 1.0.7 | ^2.6.11 | ISC | |
| 1.0.6 | ^2.6.11 | ISC | |
| 1.0.5 | ^2.6.11 | ISC | |
| 1.0.4 | ^2.6.11 | ISC | |
| 1.0.3 | ^2.6.11 | ISC | |
| 1.0.2 | ^2.6.11 | ISC | |
| 1.0.1 | ^2.6.11 | ISC |
Showing the latest 30 of 34. See every release on npm
Pre-releases (4)
| Version | Released | Vue | License |
|---|---|---|---|
| 3.0.0-beta.1 | ^3.0.0 | ISC | |
| 2.0.0-beta.2 | ^3.0.0 | ISC | |
| 2.0.0-beta.1 | ^3.0.0 | ISC | |
| 2.0.0-beta.0 | ^3.0.0 | ISC |