Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Latest commit

 

History

History
74 lines (57 loc) · 971 Bytes

README.md

File metadata and controls

74 lines (57 loc) · 971 Bytes

vue-floating-label

Vue Floating Label

Props

label

{
  type: String,
  required: true
}

showOnTop

{
  type: Boolean,
  default: false
}

disabled

{
  type: Boolean,
  default: false
}

align

{
  type: String,
  default: 'center',
  validate: align => ["center", "top"].indexOf(align) !== -1
}

Example

import FloatingLabel from "vue-floating-label";
import "vue-floating-label/dist/VueFloatingLabel.css";
<floating-label label="Label">
  <input value="">
</floating-label>

<floating-label label="Label">
  <select>
    <option value="">Default</option>
    <option value="aa">AA</option>
  </select>
</floating-label>

<floating-label label="Label" show-on-top>
  <input value="">
</floating-label>

<floating-label label="Label">
  <textarea></textarea>
</floating-label>

<floating-label label="Label" disabled>
  <input type="file">
</floating-label>