Skip to content

Enhance Tags on TrailCard component with toggle support #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

briannelson95
Copy link

Changes made

  • modified tags on trail_card.svelt to 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.svelt to remain visual without taking away from the cover photo by using the tag options

Screenshots

Before

Screenshot 2025-04-30 092259

After

Screenshot 2025-04-30 092540

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant