Profile Components
Profile Components
Profile components build the restaurant detail pages. The Hero and Navigation components anchor the page chrome; the sub-sections (About, Hours, Map, Contact, Reviews, etc.) are slotted into the page layout. Most components accept a restaurant prop typed to the Restaurant or RestaurantApiResponse type from ~/types/restaurant.
The three auto-registered sub-pages ([slug]/index.vue, [slug]/menu.vue, [slug]/reviews.vue) use inject("restaurant") to receive the restaurant object from the parent [slug].vue layout page.
Components
<XRdProfileHero />
Full-width cover image banner (96/72 responsive height) with a gradient overlay. Displays restaurant name, star rating with half-star support, review count, cuisine types, price level, and open/closed status.
<XRdProfileHero :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant object; uses coverImage, images[0], name, averageRating, ratingCount, reviewCount, cuisineTypes, priceLevel |
<XRdProfileNavigation />
Sticky top navigation tab bar with links to Home, Menu, Local Reviews, Photos, and Articles sub-pages. Derives all paths from the restaurant slug.
<XRdProfileNavigation :slug="restaurant.slug" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
slug | string | required | Restaurant URL slug used to build sub-page paths |
<XRdProfileBreadcrumb />
Breadcrumb trail: Home → Explore → {Restaurant Name}.
<XRdProfileBreadcrumb :restaurant-name="restaurant.name" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurantName | string | required | Displayed as the final breadcrumb segment |
<XRdProfileCard />
Clickable listing card used in home page grids and explore results. Links to /restaurants/{slug}. Shows hero image with price level badge, name, cuisine badges, star rating, review count, and neighborhood/city.
<XRdProfileCard :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant object with slug, heroImage, name, cuisineTypes, averageRating, totalReviews, priceLevel, location, description |
<XRdProfileSidebar />
Right-column sidebar with the full address, phone, email, website, and conditional CTA buttons (Make a Reservation, Order Online). Reads restaurant.acceptsReservations and restaurant.reservationUrl to control the reservation button.
<XRdProfileSidebar :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Full restaurant object including location, phoneNumber, email, website, acceptsReservations, reservationUrl |
<XRdProfileAbout />
Summary card combining description/tagline, cuisine types, price range, opening hours by day, and phone number in a single overview card.
<XRdProfileAbout :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | null | required | Restaurant object; falls back gracefully when null |
<XRdProfileDescription />
Minimal "About" card that renders only restaurant.description.
<XRdProfileDescription :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant object; renders description field |
<XRdProfileContact />
Full contact section displayed in a 3-column grid. Includes address with Google Maps directions link, phone, email, website, and a full opening hours table. Derives a Google Maps directions URL from location fields.
<XRdProfileContact :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | null | required | Restaurant with location, phoneNumber, email, website, openingHours |
<XRdProfileContactInfo />
Compact sidebar quick-info card showing address (with Get Directions link), phone, and website.
<XRdProfileContactInfo :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with location.address, location.neighborhood, location.city, location.state, location.zipCode, contact.phone, contact.website |
<XRdProfileHours />
Operating hours card. Iterates over restaurant.hours (an object keyed by day name) and renders open/close times.
<XRdProfileHours :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with hours object (e.g. { monday: '9am–10pm' }) |
<XRdProfileMap />
Embedded Google Maps iframe card using the Google Maps Embed API. Constructs the query from location.address, location.city, and location.state.
<XRdProfileMap :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with location.address, location.city, location.state |
Note: Requires a valid Google Maps API key configured in the embed URL.
<XRdProfileCuisine />
Badge cloud of cuisine type labels from restaurant.cuisineTypes.
<XRdProfileCuisine :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with cuisineTypes: { id, label }[] |
<XRdProfileDietary />
Checklist card of dietary options. Only renders when restaurant.dietaryOptions is non-empty.
<XRdProfileDietary :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with dietaryOptions: string[] |
<XRdProfileAmenities />
Icon + label list card of restaurant amenities. Renders an icon when amenity.icon is provided.
<XRdProfileAmenities :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with amenities: { id, label, icon? }[] |
<XRdProfileReviews />
Full reviews section. Displays a rating distribution bar chart (1–5 stars) and a list of XRdProfileReviewsItem components from restaurant.reviews.
<XRdProfileReviews :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with reviews: Review[] array |
<XRdProfileReviewsItem />
Single review row with avatar, author name, formatted date, star rating icons, and review comment text.
<XRdProfileReviewsItem :review="review" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
review | { id: string; author: string; date: string; rating: number; comment: string; avatar?: string | null } | required | Review object |
<XRdProfileMenuSection />
Grouped menu section with a bold title, optional description, a list of XRdProfileMenuItem rows, and an optional section image.
<XRdProfileMenuSection :section="menuSection" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
section | { title: string; description?: string; image?: string; items: MenuItem[] } | required | Menu section data |
<XRdProfileMenuItem />
Individual menu item row with name, description, dietary tag icons (colored by type), calorie count, and price.
<XRdProfileMenuItem :item="menuItem" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
item | MenuItem | required | Menu item with name, description?, price, calories?, featured?, available?, tags? |
<XRdProfileFAQ />
Auto-generates a UAccordion FAQ from restaurant data fields. Includes dynamic questions about reservations (from acceptsReservations), dietary options (from servesCuisine), parking, and dress code.
<XRdProfileFAQ :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | RestaurantApiResponse | null | undefined | required | Restaurant API response object |
<XRdProfileNewsletter />
Email subscription form with full name and email fields, email preference checkboxes (promotions, events, newsletter), and Zod schema validation. No external props — manages its own form state.
<XRdProfileNewsletter />
Props
None. Form state and validation are internal.
<XRdProfilePromotions />
Active promotions section displaying promotion cards with image, title, price, description, validity dates, status badge, and a "Claim Offer" button. Only renders when promotions are available.
<XRdProfilePromotions
:promotions="restaurant.promotions"
:has-specials="restaurant.hasSpecials"
:specials="restaurant.specials"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
promotions | Promotion[] | undefined | Array of promotion objects |
specials | any | undefined | Restaurant specials data (alternative source) |
hasSpecials | boolean | undefined | Flag indicating specials are available |
<XRdProfileSocial />
Social media link buttons. Renders Facebook, Instagram, Twitter, and TikTok buttons conditionally based on restaurant.social fields.
<XRdProfileSocial :restaurant="restaurant" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
restaurant | Restaurant | required | Restaurant with social?: { facebook?, instagram?, twitter?, tiktok? } |
Pages
| Route | File | Description |
|---|---|---|
/restaurants/[slug] | app/pages/restaurants/[slug]/index.vue | Profile overview: About, Promotions, FAQ, Newsletter, ContactInfo |
/restaurants/[slug]/menu | app/pages/restaurants/[slug]/menu.vue | Full menu with MenuSection/MenuItem components and dietary accommodations |
/restaurants/[slug]/reviews | app/pages/restaurants/[slug]/reviews.vue | Paginated reviews list with aggregate rating |
/explore | app/pages/explore.vue | Explore page shell (wraps NuxtPage in a container) |
/popular | app/pages/popular/index.vue | Popular restaurants index |
AI Context
package: "@xenterprises/nuxt-x-restaurants"
prefix: XRd
category: Profile
components:
- XRdProfileHero
- XRdProfileNavigation
- XRdProfileBreadcrumb
- XRdProfileCard
- XRdProfileSidebar
- XRdProfileAbout
- XRdProfileDescription
- XRdProfileContact
- XRdProfileContactInfo
- XRdProfileHours
- XRdProfileMap
- XRdProfileCuisine
- XRdProfileDietary
- XRdProfileAmenities
- XRdProfileReviews
- XRdProfileReviewsItem
- XRdProfileMenuSection
- XRdProfileMenuItem
- XRdProfileFAQ
- XRdProfileNewsletter
- XRdProfilePromotions
- XRdProfileSocial
use-when: >
Building restaurant profile/detail pages. Use Hero + Navigation for the page
chrome, Sidebar for the right column, and individual section components
(About, Hours, Map, Reviews, Menu, Contact) as the main column content.
ProfileCard is used in listing grids across home page and explore pages.
Sub-pages receive restaurant data via Vue inject from the parent [slug].vue layout.
auto-registered-pages:
- route: /restaurants/[slug]
file: app/pages/restaurants/[slug]/index.vue
- route: /restaurants/[slug]/menu
file: app/pages/restaurants/[slug]/menu.vue
- route: /restaurants/[slug]/reviews
file: app/pages/restaurants/[slug]/reviews.vue
- route: /explore
file: app/pages/explore.vue
- route: /popular
file: app/pages/popular/index.vue
Filter Components
Composable filter UI for the restaurant explore page — sidebar panel, active chip strip, and individual filter cards for cuisine, location, price, rating, amenities, and dietary options.
Shared Components
Site-wide components used across all pages — navigation header, footer, star rating display, and menu item card.
