Creating and Displaying Tags
Explore how to create and manage dynamic tags extracted from image data in a Nuxt 3 project. This lesson guides you through manipulating tags using JavaScript Set and split methods, enhancing your app’s ability to display and filter images interactively based on user selections. You will understand how to update tags each time new data arrives, improving the user experience with dynamic content.
We'll cover the following...
Locating the tags property
When we make a request from the Pixabay API we receive an array of images. Each image is an object which resembles this:
Some key properties we use are:
Line 5: We have access to the
tagsfrom each image, we can use these to display and filter the images we display.Line 9: The
webFormatURLcan be used to display an image that is 640 px wide.Line 12: The
largeImageURLproperty contains a 1280 px wide version of the image to display ...