Skip to content

[Feature Request] Built-in copy/export utility for rendered UI (markdown parity) #298

Description

@JAYKALIA007

Hey team 👋

First off, love what you've built here.

Context

I recently migrated my app from markdown-based LLM responses to json-render generative ui for better UX. One thing I'm missing though is copy portability.
With markdown, users could copy a response and paste it anywhere — docs, email, Slack — and it would still be readable and structured.

With generative UI, the same action gives them the raw JSON spec, which isn't meaningful outside the app.

Example

Prompt: "Give me a list of 5 users"

  • Rendered: A beautiful Table component ✨
  • Copied: The raw JSON spec 😅

What I've Tried

  • Asking the LLM to return both a ui spec and a markdown twin (works but costs extra tokens)
  • DOM serialization via outerHTML (only works in rich text editors)
  • Manual text derivation from the JSON (lossy and app-specific)

Question

Is there a recommended pattern for this I might have missed? If not, would something like a toMarkdown(spec) utility or a <CopyButton /> component be something the team would consider?

Happy to contribute if there's interest — just wanted to check in before going down a custom path. Thanks so much! 🙏

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions