Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Build Your First Vue.js App > 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...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

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

  • RSS
  • |
  • Atom