Skip to content

Components reference

@menestrel/astro exposes four .astro components. Import them from @menestrel/astro.

---
import { RichText, CmsImage, CmsSeo, MenestrelBadge } from '@menestrel/astro';
---

Renders a richtext field from the TipTap whitelist: headings, lists, links, bold, italic, images and videos.

Prop Type Description
value RichTextValue The field to render. Required.
class string Class set on the wrapper.
videoTitle string Accessible title for video iframes (default Video).

A node outside the whitelist is skipped with a build warning, never rendered as-is. The richtext-styles.css sheet is not imported by default: add it in your layout if you want the default styling.

Renders a responsive <picture> from an image reference: several widths, AVIF and WebP, focal point as object-position.

Prop Type Description
image AssetRef The image reference. Required.
alt string Alt text. See the guard below.
sizes string The sizes attribute of the <picture>.
widths number[] Widths to generate.
loading 'lazy' | 'eager' Loading strategy.
fetchpriority 'high' | 'low' | 'auto' Fetch priority.
class string Class of the <picture>.
imgClass string Class of the <img>.

alt is a guard: if it is missing and the asset carries no alt, the build fails. An explicit alt="" (decorative image) is accepted.

Writes the <title>, <meta name="description">, <link rel="canonical"> and the Open Graph tags into the <head>.

Prop Type Description
seo SeoValue The entry’s SEO field.
title string Fallback title if the SEO field carries none.

With no title and no seo.title, the build fails: a page with no title is an error, not a silent default. canonical defaults to the current URL.

A small “Powered by Menestrel” link, present by default in the starter.

Prop Type Description
locale 'fr' | 'en' Label language (default fr).
class string Extra class.