Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Vue Foundations > Lesson 24

Adding search input

Now that we have our form working, let's add a text input where users can enter their search.

We'll add the input tag just above the submit button, we'll make it type text and we'll give it a placeholder value of "Search for posters".

Finally, we'll make it required since you shouldn't be able to submit without a value.

index.html

<form class="search-bar" v-on:submit.prevent="onSubmit">
  <input type="text" placeholder="Search for posters" required>

Back to course page

Click to load comments...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom