wanderer
wanderer copied to clipboard
Enhance Tags on TrailCard component with toggle support
Changes made
- modified tags on
trail_card.sveltto show only first 2 tags by default - added button after 2 tags to view more
- added function to allow for toggle of viewing more tags
- made text smaller in
chip.svelt
Why this is useful
- allows the
trail_card.sveltto remain visual without taking away from the cover photo by using the tag options
Screenshots
Before
After
Explanation
I like the use of adding tags to the trails but they take up a lot of space on the trail card view, taking away from the visual images of each trail. I made it so by default it will show the first 2 tags and show "+[x] more" which is a toggle allowing the user to expand the remaining tags if they choose to do so. I also made the text smaller "text-xs" on the chip.svelt to help with the visuals.