Skip to content

Expose Studio components #3013

@donaldpipowitch

Description

@donaldpipowitch

Description

Hi, we'd like to be able to leverage @pandacss/studio in other contexts (e.g. Storybook). As far as I can tell it should be "relatively" simple by exporting the base components (e.g. packages/studio/src/components/colors.tsx) so that they can be used in bigger React applications.

The only thing (?) that I would assume that needs to be done is adding some kind of context provider to expose the tokens (- I guess this would be about rewriting packages/studio/src/lib/panda-context.ts to be an actual React Context that you provide the tokens to...?).

Problem Statement/Justification

It makes @pandacss/studio more versatile and avoids re-creating the Studio functionality in community land.

Proposed Solution or API

  • Make components like [packages/studio/src/components/colors.tsx] a top-level export of @pandacss/studio.
  • Provide a React Context Provider to be able to pass all the data that these components need at runtime.

Alternatives

  • Re-create the Studio functionality in user land.
  • Live with the Astro based Studio next to other design/documentation artifacts.

Additional Information

No response

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