ui icon indicating copy to clipboard operation
ui copied to clipboard

feat: devtools poc

Open romhml opened this issue 1 year ago • 1 comments

This is a rough experiment to explore devtools for @nuxt/ui.

image

The first use case would be to help users customise components with an interactive theme editor that updates the app.config.ts file or generates the ui prop.

romhml avatar Sep 13 '24 10:09 romhml

Awesome 😍

Next step would be the Copy Code button I guess (like for assets): CleanShot 2024-09-16 at 15 38 03@2x

atinux avatar Sep 16 '24 13:09 atinux

Deploying ui3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0b5aa8c
Status: ✅  Deploy successful!
Preview URL: https://2701005d.ui-6q2.pages.dev
Branch Preview URL: https://wip-devtools.ui-6q2.pages.dev

View logs

pnpm add https://pkg.pr.new/@nuxt/ui@2196

commit: 0b5aa8c

pkg-pr-new[bot] avatar Oct 14 '24 10:10 pkg-pr-new[bot]

The PR is ready! I've put some efforts in generalizing the implementation because I think this can be made into a standalone module. I'll look into it soon 😄.

I have some ideas for improvements we can implement later on:

  • Adding a theme tab to edit and preview the ui props and the Nuxt UI configuration.
  • Implementing a specific input for icons with a preview.
  • Supporting multiple inputs / types for props.
  • Displaying multiple variants of a components in the preview (e.g. variant x size).

romhml avatar Oct 15 '24 17:10 romhml