More Premium Hugo Themes Premium Vue Themes

Vue Js Toggle Button

:fish_cake: Vue.js 2 toggle / switch button - simple, pretty, customizable

Vue Js Toggle Button

:fish_cake: Vue.js 2 toggle / switch button - simple, pretty, customizable

Author Avatar Theme by euvl
Github Stars Github Stars: 930
Last Commit Last Commit: May 16, 2020 -
First Commit Created: Aug 27, 2024 -
Vue Js Toggle Button screenshot

Overview

The Vue.js toggle/switch button is a versatile component that enhances user interfaces with an elegant and functional design. It allows developers to seamlessly integrate toggle functionality into their applications, providing a smooth user experience. With a variety of customization options, this toggle button suits various design needs and user interactions.

Whether you’re building a simple toggle for settings or a more complex feature, this component delivers with its engaging animations and responsive controls. Its compatibility with multiple browsers ensures that it reaches a wide audience without compromising performance.

Features

  • Customizable Initial State: Set the initial state of the toggle button with the value property, defaulting to false for a standard off position.
  • Automatic Syncing: By enabling the sync property, the toggle button will automatically update to reflect any changes in the value property, ensuring real-time synchronization.
  • Animation Control: Customize the transition speed of the button using the speed property, defaulting to 300 milliseconds for smooth animations.
  • User Interaction Lock: With the disabled option, easily prevent any mouse interactions with the button for states where user input should be restricted.
  • Dynamic Color Options: Adjust the button’s colors based on its state using the color property, whether defining colors as strings or as an object for greater detail.
  • CSS Styling Flexibility: Activate or deactivate inline styles with the css-colors option, giving preference to external CSS styling for easier customization.
  • Custom Labels Support: Tailor the labels shown with the labels property to either show the default “on” and “off” or define your own labels for a more personalized touch.
  • Responsive Sizing: Define the dimensions of the button with width, height, and margin, allowing you to fit the toggle perfectly into your design layout.