Skip to content

feat: defineStudioMeta prop and slot annotations#525

Draft
hendrikheil wants to merge 1 commit into
mainfrom
feat/define-studio-meta
Draft

feat: defineStudioMeta prop and slot annotations#525
hendrikheil wants to merge 1 commit into
mainfrom
feat/define-studio-meta

Conversation

@hendrikheil

@hendrikheil hendrikheil commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Caution

This is very early stage, and primarily serves a PoC for things to come.

Adds a defineStudioMeta compiler macro (via nuxt-component-meta #116) to annotate component props and slots for the Studio editor, plus typed helpers under nuxt-studio/component-meta and a new collection reference input (single + multiple).

<script setup lang="ts">
import { defineStudioMeta, ui, media, icon, select, collectionItem, hidden } from 'nuxt-studio/component-meta'

defineStudioMeta({
  props: {
    cover: ui({ label: 'Cover image', type: media() }),
    author: collectionItem({ collection: 'authors', field: 'stem' }),
    variant: select({ options: ['default', 'outlined'] }),
    internal: hidden(),
  },
  slots: {
    title: { label: 'Heading' },
  },
})
</script>

Demo: playground/docusAuthorCard component on the /pages/author-card page.

Depends on the pkg.pr.new build of nuxt-component-meta#116 (pinned via pnpm override).

Closes #129, closes #436

Registers a defineStudioMeta compiler macro on nuxt-component-meta
(PR #116) so component authors can annotate props (label, description,
hidden, input overrides, icon libraries, select options) and slots
(label, description) for the Studio editor, bypassing the rendering
heuristics. Adds a new 'reference' input backed by Nuxt Content
collections (single and multiple), typed authoring helpers under
nuxt-studio/component-meta, and wires the annotations through both the
TipTap props panel and the schema-based form editor.

Closes #129, closes #436
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
content-studio Ready Ready Preview, Comment Jul 1, 2026 8:51pm
nuxt.studio Ready Ready Preview Jul 1, 2026 8:51pm

@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/nuxt-studio@525

commit: d251add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display different slot names on Studio UI Allow annotating content component props

1 participant