Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React implementation #226

Open
jonit-dev opened this issue Nov 14, 2024 · 5 comments
Open

React implementation #226

jonit-dev opened this issue Nov 14, 2024 · 5 comments

Comments

@jonit-dev
Copy link

I created a React implementation of this lib (still WIP)

https://github.com/jonit-dev/vscode-extension-react-webview-boilerplate

Together with a boilerplate + hot reload

enjoy

image

@bendera
Copy link
Member

bendera commented Nov 15, 2024

Hi,

Thank you for showing interest in the project. Well... a side project already exists for this purpose: https://github.com/vscode-elements/react-elements I've just noticed that this fact is missing from the documentation. My bad, sorry.

@nimo23
Copy link

nimo23 commented Dec 20, 2024

@bendera I want to use this library as a typical component framework (e.g. like MUI-React). Is this possible? According to the web component version documentation (https://vscode-elements.github.io/getting-started/#installation):

The appearance of components provided by VSCode Elements depends on the presence of hundreds of CSS variables and default styles supplied by the VSCode Webview. The Webview Playground was created to emulate this environment.

It sounds like these vscode-elements is not a typical component library, but need to be run inside a vscode host (as an extension). Would it be possible to rebuild this library (React library) to use it as a standalone component library? @jonit-dev Is this already possible with your react implementation?

@bendera
Copy link
Member

bendera commented Dec 20, 2024

It's not a typical component library in terms of styling. It works without the vscode host, but will be ugly. You can go to the documentation page, copy the CSS variables from the HTML element, and paste into your code. But you don't need any additional javascript setup.

@nimo23
Copy link

nimo23 commented Dec 20, 2024

You can go to the documentation page, copy the CSS variables from the HTML element, and paste into your code.

@bendera It would be great to be able to use it as a typical component library (especially for React) out of the box (without a vs code host) where the CSS styles (as themes) are already included. Don't you think? I think the use cases would be much larger than if this lib was limited to vs code extensions. What do you think of the idea?

@bendera
Copy link
Member

bendera commented Dec 21, 2024

@nimo23 See vscode-elements/react-elements#6 (comment)

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

No branches or pull requests

3 participants