A Vue component for floatl package with less and css files (sass is comming soon).
A test is available on test folder (online test comming soon)
npm i vue-floatl
Include the script file, then install the component with Vue.use(VueFloatl);
e.g.:
<head>
<link rel="stylesheet" href="/node_modules/vue-floatl/dist/vue-floatl.css">
</head>
<body>
<div id="app">
<v-floatl></v-floatl>
</div>
<script type="text/javascript" src="/node_modules/vue/dist/vue.min.js"></script>
<script type="text/javascript" src="/node_modules/vue-floatl/dist/vue-floatl.js"></script>
<script type="text/javascript">
Vue.use(VueFloatl);
const app = new Vue({
el: '#app',
});
</script>
</body>
import Vue from 'vue';
import VueFloatl from 'vue-floatl';
Vue.use(VueFloatl);
CSS (minified) and Less file are available there :
- dist/vuefloatl.css
- src/vuefloatl.less
Once installed, it can be used in a template as simply as:
<v-floatl label="Your email" v-model="email"></v-floatl>
- label (default: "My label")
- value (or v-model, default: "")
- required : if input field is required (default: false)
- name: if you want put a name to your input (default: no name attribute)
- inputClass: if you want to add classes to your input (you can use vue class syntax)
- type: type of yout input (default: "text")
In some case, you want to have a full access to your input to add some specific other properties. vue-floatl allow you to define your input via slot. Here an example :
<v-floatl label="Test with sloat">
<input type="password" class="floatl__input" placeholder="Test with sloat">
</v-floatl>
To working, your input must have the "floatl__input" class define and the label placeholder.