---
title: "Content Components"
description: "Content components the layer adds on top of Nuxt UI prose. Motion adds entrance animations, StarsBg lays an animated star field behind a section, and LandingCover, LandingSection and friends build an editorial landing page. All work directly in Markdown."
canonical_url: "https://docs.mhaibaraai.cn/en/docs/writing/content-components"
---
# Content Components

> Content components the layer adds on top of Nuxt UI prose. Motion adds entrance animations, StarsBg lays an animated star field behind a section, and LandingCover, LandingSection and friends build an editorial landing page. All work directly in Markdown.

Besides the Nuxt UI prose components in [MDC Components](https://docs.mhaibaraai.cn/en/docs/writing/mdc-components), the layer's `components/content/` directory provides the components below for use in Markdown. `HighlightInlineType` and `HeaderToggleButton` in the same directory are used internally by props tables and the header and are not meant for content.

## `Motion`

`Motion` wraps the `Motion` component from [motion-v](https://motion.dev/docs/vue) to give its content an entrance animation. By default the content fades in from a blurred, slightly enlarged state:

```mdc
::motion
**Movk Nuxt Docs**: an editorial docs theme for Nuxt projects.
::
```

| Prop | Default |
| --- | --- |
| `initial` | `{ scale: 1.1, opacity: 0, filter: 'blur(20px)' }` |
| `animate` | `{ scale: 1, opacity: 1, filter: 'blur(0px)' }` |
| `transition` | `{ duration: 0.6, delay: 0.1 }` |

Other motion-v `Motion` props and HTML attributes such as `class` are passed through. To reveal elements one after another, increase `transition.delay`:

```mdc
::motion
**Build modern docs**
::

::motion
---
transition: { duration: 0.6, delay: 0.3 }
---
A docs theme built on Nuxt 4.
::

::motion{class="flex gap-3"}
---
transition: { duration: 0.6, delay: 0.5 }
---
  :::u-button{to="/en/docs/getting-started"}
  Get started
  :::
::
```

## `StarsBg`

`StarsBg` draws three layers of slowly rising stars behind its section, for the hero or closing section of a landing page. It is absolutely positioned inside its parent, so the parent needs `relative`, and `isolate` to create a stacking context:

```mdc
::div{class="relative isolate h-48 overflow-hidden"}
:stars-bg
::
```

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `starCount` | `number` | `300` | Total number of stars across the three layers |
| `color` | `string` | `'var(--ui-primary)'` | Star color, any CSS color |
| `size` | `{ min: number, max: number }` | `{ min: 1, max: 2 }` | Star size range in px |

```mdc
:stars-bg{:star-count="120" color="var(--ui-text-muted)"}
```

> [!NOTE]
> 
> Star positions are cached per route, so server and client render the same result. The animation stops when the system "reduce motion" setting is on.

## Landing page components

The layer ships a set of editorial landing page components. This site's home page and the home pages of all three official templates are built from them. They usually live in `content/index.md`, and each one renders a full-width section:

| Component | Purpose | Props | Slots |
| --- | --- | --- | --- |
| `LandingCover` | Cover: mono kicker, double rule, display title, lead and side content | `kicker`, `aside` | `title`, `description`, `links`, `default` |
| `LandingIndex` | Numbered contents list generated from the top-level docs sections | `label` | — |
| `LandingSection` | Numbered section: title and lead on the left, feature grid on the right | `index`, `kicker` | `title`, `description`, `links`, `aside`, `default` |
| `LandingFeature` | One cell of the feature grid, numbered automatically in order | — | `title`, `description` |
| `LandingFigure` | Captioned figure with optional separate light and dark images | `src`, `dark`, `alt`, `caption`, `label` | — |
| `LandingClosing` | Closing headline and buttons | — | `title`, `links` |

```mdc [content/index.md]
::landing-cover{kicker="Docs" aside="MIT"}
#title
My Docs

#description
One sentence about your project.

#links
  :::u-button{to="/docs/getting-started" trailing-icon="i-lucide-arrow-right"}
  Get started
  :::

#default
  :landing-index{label="Contents"}
::

::landing-section{index="01" kicker="Features"}
#title
Highlights

#description
Two or three sentences about this group of features.

#default
  :::landing-feature
  #title
  Feature one

  #description
  What it does.
  :::
::

::landing-closing
#title
Start with one Markdown file

#links
  :::u-button{to="/docs/getting-started"}
  Get started
  :::
::
```

> [!TIP]
> 
> Declare a version in 
> 
> runtimeConfig.public.version
> 
>  in 
> 
> nuxt.config.ts
> 
>  and 
> 
> LandingCover
> 
>  shows it before the kicker, for example read from 
> 
> package.json
> 
> : 
> 
> version: pkg.version
> 
> .


## Sitemap

See the full [sitemap](https://docs.mhaibaraai.cn/sitemap.md) for all pages.
