Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

uiwjs/react-run-web

Repository files navigation

Run Web

Buy me a coffee Build & Deploy Coverage Status Open in unpkg npm bundle size npm version Open in Gitpod

Online Code Editor for Rapid Web Development, Preview Demo.

Install

npm install @uiw/react-run-web

Usage

import RunWeb from '@uiw/react-run-web';
<RunWeb
 css="div {color:red;}"
 js="console.log('hello world!')"
 html="<div>hello world!</div>"
/>

Props

interface RunWebProps extends React.IframeHTMLAttributes<HTMLIFrameElement> {
 css?: string;
 js?: string;
 html?: string;
 title?: string;
 head?: React.ReactNode;
}

Online Code Preview

Preview Demo Example.

https://uiwjs.github.io/react-run-web#/?html=...&js=...&css=...

Development

Runs the project in development mode.

# Step 1, run first, listen to the component compile and output the .js file
# listen for compilation output type .d.ts file
npm run watch
# Step 2, development mode, listen to compile preview website instance
npm run start

production

Builds the app for production to the build folder.

npm run build

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

Contributors

As always, thanks to our amazing contributors!

Made with contributors.

License

Licensed under the MIT License.

AltStyle によって変換されたページ (->オリジナル) /