Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <html lang="en">
  <meta charset="UTF-8">
  <title>JSX Alternative to Render Virtual DOM</title>
  <div id="app"></div><!-- Rendered with React -->
  <p>Repo: <a href="" target="_blank"></a></p>
  <p>If you like it and want to get updated follow me on <a href="" target="_blank">twitter</a> or <a href="" target="_blank"></a></p>
  <p>Do you want to play with a tool which lets you code web apps with HTML and spits out the presented syntax? Visit <a href="" target="_blank"></a>.</p>
  <p>Visit <a href="" target="_blank"></a> for more.</p>



                .bold {
  font-weight: 700;

.italic {
  font-style: italic;



                // configure renderer
const tag = createRenderer({
  createVDomElement: React.createElement,
  formatters: {
    bold: () => ({
      tag: 'strong',
      props: { className: 'bold' }
    italic: () => ({
      tag: 'span',
      props: { className: 'italic' }

// example component
const exampleComponent = ({ 
}) => (
  tag('div', (props, { tag }) => {
    if (someCondition) {
      tag('p', (props, { text }) => {
        text({ bold: firstProgrammer }, ', you\'re going to do pair-programming with ', secondProgrammer, '.')
        if (!secondProgrammer) {
          text({ bold: { italic: firstProgrammer } }, ', you\'ll code this task by yourself.')
        if (!firstProgrammer && !secondProgrammer) {
          text('Hey man! Can you tell us your name before we give you job to do?')

// app
const app = () => (
  tag('div', (props, { component, tag }) => {
    props.className = 'container'
    tag('h1', (props, { text }) => {      
      text('JSX Alternative to Render Virtual DOM')
    component(exampleComponent, { // comment out props to see the effect
      firstProgrammer: 'Chris', 
      secondProgrammer: 'John',
      someCondition: true

// gluecode