Skip to content

serhii-chernenko/vue3-toggle-input

Repository files navigation

difficulty training chapter tags
1
true
Chapter 1: Advanced Component Techniques
vue

Toggle Input Challenge

Your task is to create a custom toggle input component that works with v-model.

Requirements

  1. The component should take a boolean v-model that updates as expected when the toggle is clicked
  2. The v-model should support a custom modifier (binary) that uses converts values to 1 or 0 instead of true/false

💡 HINT: Feel free to use TypeScript to make your component type safe if you'd like. This is NOT required however.

Screenshot of the solution