TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pieroenrico/tune-me-in/llms.txt
Use this file to discover all available pages before exploring further.
PortableText component renders rich text content from Sanity CMS, including custom blocks (images, products) and annotations (links, product actions).
PortableText
Main component for rendering Sanity Portable Text content.Array of Portable Text blocks from Sanity
CSS class to apply to the container
Features
- Renders rich text with custom serializers
- Supports custom block types
- Custom mark/annotation rendering
- Built on
@sanity/block-content-to-react
Usage Example
src/components/PortableText.client.jsx:28
Block Types
Custom block types for special content within Portable Text.Block
Standard text block with style support.Block node from Sanity containing:
style- Block style (h2, blockquote, normal)
Block content
Supported Styles
h2- Rendered as heading with text-2xlblockquote- Large quote text (text-3xl)normal- Standard paragraph (rendered as div)
src/components/blocks/Block.client.jsx:3
BlockImage
Image block with optional full-width display.Block node containing:
fullWidth(boolean) - Whether image spans full viewport widthimage(object) - Sanity image with asset, crop, hotspot, dimensionscaption(string) - Optional image caption
Features
- Responsive image from Sanity
- Full-width option for breaking out of container
- Optional caption below image
- 50vw default sizing
Usage in Sanity
src/components/blocks/BlockImage.client.jsx:7
BlockProduct
Standalone product block with add to cart.Block node containing:
productWithVariant.product- Product object with_id,variantId,slugcaption(string) - Optional caption
Features
- Product title and price
- Product image
- Add to cart button
- Links to product page
- Bordered card display (50% width)
- Uses
ProductsContextfor Shopify data
Usage Example
In your Sanity Portable Text:src/components/blocks/BlockProduct.client.jsx:9
BlockInlineProduct
Inline product mention with hover tooltip.Block node containing:
productWithVariant.product- Product referenceaction(string) - Either"addToCart"or"buyNow"
Features
- Inline product link in text
- Hover tooltip with product details
- Product image in tooltip
- Optional action button (add to cart or buy now)
- Blue link styling with underline
- Uses Tippy.js for tooltip
Usage Example
src/components/blocks/BlockInlineProduct.client.jsx:10
BlockInlineProductMarginalia
Inline product that displays in margin beside text.Block node containing:
productWithVariant.product- Product referenceaction(string) - Either"addToCart"or"buyNow"
Features
- Product appears in right margin of text
- Product title, price, and image
- Optional action button
- Fixed width (w-48)
- Absolute positioning
- Best for wide layouts
Note
This component uses absolute positioning and may overflow on narrow screens. Best used in content with adequate margin space. Source:src/components/blocks/BlockInlineProductMarginalia.client.jsx:9
Annotations (Marks)
Inline annotations for text within Portable Text blocks.AnnotationLinkEmail
Email link annotation.Mark data containing:
email(string) - Email address
Link text content
Features
- Creates
mailto:link - Underlined text
Usage Example
src/components/annotations/AnnotationLinkEmail.jsx:1
AnnotationLinkExternal
External URL link annotation.Mark data containing:
url(string) - External URLnewWindow(boolean) - Whether to open in new tab
Link text content
Features
- Configurable target (new window or same)
- Security attributes (noopener, noreferrer)
- Underlined with hover opacity
- Black text color
src/components/annotations/AnnotationLinkExternal.jsx:1
AnnotationLinkInternal
Internal page link annotation.Mark data containing:
slug(string) - Internal page slug/path
Link text content
Features
- Uses Hydrogen’s
Linkcomponent for client-side navigation - Link icon indicator
- Underlined with hover effect
- Returns null if no slug provided
src/components/annotations/AnnotationLinkInternal.jsx:4
AnnotationProduct
Interactive product annotation for add to cart or buy now.Mark data containing:
productWithVariant.product- Product reference with_id,variantIdaction(string) - Either"addToCart"or"buyNow"quantity(number) - Quantity to add (default: 1)
Link text (usually product name)
Features
- Inline product action (add to cart or buy now)
- Icon indicator (cart or lightning bolt)
- Checks product availability
- Falls back to plain text if unavailable
- Blue link styling
- Uses ProductsContext for Shopify data
Usage Example
Actions
- addToCart: Adds product to cart and shows cart icon
- buyNow: Proceeds directly to checkout with lightning bolt icon
src/components/annotations/AnnotationProduct.client.jsx:7