StealThis .dev

Travel — Point-of-interest Card

A reusable point-of-interest card for travel guides, built with pure CSS and inline SVG scenes instead of photos. Each card shows a category chip, title, partial-fill star rating with review count, a one-line description, price or entry tier, distance and a view-on-map link. A heart toggle saves places to a trip and persists in localStorage, while a filter bar and a small stylised pin map tie four variants together. Warm editorial palette, hover lift and keyboard-friendly controls throughout.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Point-of-interest Card

The building block for any travel guide: a responsive grid of point-of-interest cards for a fictional Lisboa & Algarve trip. Four variants — a boutique hotel, a seafood taverna, a hilltop viewpoint and a hidden cove — each lead with a layered CSS/SVG “landscape” instead of a photo, then stack a category chip, title, star rating with review count, a one-line description, a price or entry tier, the distance and a “view on map” link. Best-time and free-entry badges add quick context without clutter.

Every interaction actually works in vanilla JS. The heart in each photo toggles the place into your trip and persists in localStorage, with a live count in the header and an animated pulse on save. A filter bar narrows the grid by category or down to just your saved places, falling back to a friendly empty state. Star ratings are drawn with a single masked gradient so half-stars fill precisely, and a small stylised pin map lets the “view on map” links and pins highlight the matching spot. Cards lift on hover and focus, controls are keyboard-usable with visible focus rings, contrast meets WCAG AA and the layout collapses to a single column down to ~360px.

Illustrative travel UI only — fictional destinations, prices, and maps.