Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and more.

Overview

Write components once, run everywhere. Compiles to:

Fiddle


code style: prettier PRs Welcome License Types


At a glance

Mitosis is inspired by many modern frameworks. You'll see components look like React components and use React-like hooks, but have simple mutable state like Vue, use a static form of JSX like Solid, compile away like Svelte, and uses a simple, prescriptive structure like Angular.

This is what a basic Mitosis component that manages some state looks like:

import { useState, Show, For } from '@builder.io/mitosis';

export default function MyComponent(props) {
  const state = useState({
    newItemName: 'New item',
    list: ['hello', 'world'],
    addItem() {
      state.list = [...state.list, state.newItemName];
    },
  });

  return (
    <div>
      <Show when={props.showInput}>
        <input
          value={state.newItemName}
          onChange={(event) => (state.newItemName = event.target.value)}
        />
      </Show>
      <div css={{ padding: '10px' }}>
        <button onClick={() => state.addItem()}>Add list item</button>
        <div>
          <For each={state.list}>{(item) => <div>{item}</div>}</For>
        </div>
      </div>
    </div>
  );
}

Learn more in the docs

CLI

Try Mitosis out locally with our CLI

npm install -g @builder.io/mitosis-cli

mitosis compile --to=vue my-file.lite.jsx

Why

Component libraries

Managing support for libraries that provide UI components across frameworks is a pain, especially when webcomponents are not an option (e.g. for server side rendering, best performance, etc). With Mitosis you can write once, and run everywhere while maintaining full compatibilty with the target framework.

Modern workflows for all platforms

Mitosis allows you to incrementally adopt modern and familiar workflows for many different platforms. For instance, when working with Shopify, you can server side render to liquid and hydrate with React.

JS framework fatigue

If you have ever had to migrate a huge codebase from one framework to another, it's an absolute nightmare. Writing components at a higher level of abstraction allows you to move from one to another with ease.

Design to code

With Mitosis, you can convert designs from Figma or Sketch and convert them to clean code for the framework of your choice. You can even use Builder.io to visually drag/drop to build UIs and edit the code side by side.

How does it work

Mitosis uses a static subset of JSX, inspired by Solid. This means we can parse it to a simple JSON structure, then easily build serializers that target various frameworks and implementations.

export function MyComponent() {
  const state = useState({
    name: 'Steve',
  });

  return (
    <div>
      <input
        value={state.name}
        onChange={(event) => (state.name = event.target.value)}
      />
    </div>
  );
}

becomes:

{
  "@type": "@builder.io/mitosis/component",
  "state": {
    "name": "Steve"
  },
  "nodes": [
    {
      "@type": "@builder.io/mitosis/node",
      "name": "div",
      "children": [
        {
          "@type": "@builder.io/mitosis/node",
          "bindings": {
            "value": "state.name",
            "onChange": "state.name = event.target.value"
          }
        }
      ]
    }
  ]
}

Which can be reserialized into many languges and frameworks. For example, to support angular, we just make a serializer that loops over the json and produces:

@Component({
  template: `
    <div>
      <input [value]="name" (change)="name = $event.target.value" />
    </div>
  `,
})
class MyComponent {
  name = 'Steve';
}

Adding framework support is surprisingly easy with the plugin system (docs coming soon).

Try it out

 

Use our Figma plugin to turn designs into code!

 

Try our interactive fiddle

Figma plugin Fiddle

 

Try our VS Code extension for in-IDE visual coding

 

Try our Shopify app for visual Shopify store building

Vscode plugin Vscode plugin

 

Try our headless CMS for no-code APIs for all sites and apps

 

View our upcoming ecommerce integrations

Vscode plugin Vscode plugin

No-code tooling

Mitosis's static JSON format also enables no-code tooling for visual code editing and importing. You can see this with Builder.io or Figma.

Formatting options

Mitosis supports settings for generating code to match your preferred formatting, libraries, etc. These output options will be customizable and extensible with plugins soon.

Who uses it

Status

Framework Status
React Alpha
Vue Alpha
Liquid Alpha
Builder.io Alpha
Solid Alpha
Figma Alpha
Angular Alpha
Svelte Alpha
HTML/CSS/JS Alpha
Webcomponents Alpha
React Native Alpha
SwiftUI Experimental

Coming soon

  • Stable (v1) release
  • Plugin API docs for custom syntaxes and extensions
  • VS code plugin

Made with ❤️ by Builder.io

Comments
  • feat: preserve react component props types

    feat: preserve react component props types

    Description

    Add a short description of:

    • what changes you made, #372
    • why you made them, and
    • any other context that you think might be helpful for someone to better understand what is contained in this pull request.

    This sort of information is useful for people reviewing the code, as well as anyone from the future trying to understand why changes were made or why a bug started happening.

    ##############

    the PR is WIP, any suggestions are welcome.

    Now I am diving into mitosis build, I am not much familiar with it.

    DONE

    • [x] react framework support preserving props type and export type/interface

    TODO

    • [ ] context file type
    • [ ] parse 'name' as string
    • [ ] support other framework
    • [ ] building process
    opened by decadef20 17
  • Preserve Typescript types in output

    Preserve Typescript types in output

    Hello not sure if I'm understanding well the purpose of this library but when I create a component like:

    export type ButtonProps = {
      name: string;
    };
    
    export default function Button(props: ButtonProps) {
      return <button>{props.name}</button>;
    }
    
    

    The result is:

    export default function Button(props) {
      return <button>{props.name}</button>;
    }
    

    or:

    import { Component, Input } from "@angular/core";
    
    @Component({
      selector: "button",
      template: `
        <button>{{name}}</button>
      `,
    })
    export default class Button {
      @Input() name: any;
    }
    

    If I want to use mitosis to create my own components library, how I can get the types of my components to be able to expose them?

    enhancement help wanted core cli TypeScript 
    opened by CKGrafico 17
  • feat: Alpine.js generator

    feat: Alpine.js generator

    Description

    This PR adds a new alpine generator to @builder.io/mitosis (core). It makes no changes to the existing codebase except for adding the alpine generator to the fiddle and to the cli. It should close issue #11.

    Status: Good Enough

    This PR isn't capable of making any Alpine.js component from Mitosis; but I believe that most, if not all the features that are implemented by mitosis for other generators have been implemented here. As there is currently limited documentation on the subject of writing custom generators, by opening this PR I hope to get feedback from the Builder.io team on exactly what needs to happen in order for this to be merged; or, how to integrate the generator as a plugin of some sort if the Builder.io team is not interested in maintaining Alpine.js support.

    Show, Fragment, and From functionality are all there. Styles, state, and events can be bound. Users can choose several options for the style of their output, and all hooks (with the exception of onUnMount) can be used.

    To-dos

    • [x] Fiddle integration
    • [x] CLI Integration
    • [ ] Tests: How should we test?
      • Is there a standard suite of components we should render w/ Alpine.js?
    • [ ] Props?
      • No real way to pass (runtime) props into alpine, without using an external layout engine like Laravel Blade.
    • [ ] Children
      • Same issue as props
    • [x] useRef hook: x-ref
      • Should refnames be altered? i.e. const inputRef = useRef(); => this.$refs.input ?
    • [x] onMount hook
      • Will encounter issues if the state already has an init() function.
    • [ ] onUpdate hook
      • Multiple onUpdate hooks with no dependencies get concatenated.
      • [x] use $watch for each dependency that is a state property.
      • [ ] If a dependency is a ref, bind the x-effect handler to that element.
      • [x] Otherwise use x-bind="updateHook" on the root node and add { updateHook: { ['x-effect']() {/* the code */} } } to the state.
    • [x] Spread bindings
    • [ ] Context
    • [ ] Styling
      • Not 100% sure how to handle this, it seems like there's a shared interface between generators for different styles handling, but I don't completely understand it.
      • inline styles can be handled 1:1. i.e.
    // Mitosis component
    export default function MyComponent(props) {
      return (
        <div css={{color: "red"}}>
          Hello
        </div>
      );
    }
    
    <!-- Alpine Component -->
    <div x-data x-bind:css="{color: 'red'}">
      Hello
    </div>
    
    • [x] x-if: Implementation of the Show component.
    • [x] x-for: Implementation of the For component.
    • [x] Fragment.
    • [x] x-data: Currently supports inline and separate.
    <!-- Inline -->
    <div x-data="{open: false}"><!-- ... --></div>
    
    <!-- Separate -->
    <div x-data="dropdown()"><!-- ... --></div>
    <script>
      document.addEventListener('alpine:init', () => {
        Alpine.data('dropdown', () => ({open: false}))
      })
    </script>
    
    • [x] x-init (Root element)
    • [x] x-bind
    • [x] x-on
    • [x] x-html: Inline properties are currently always bound with x-html. We need a way to bind them as x-text if full html is not needed. This is equivilant to dangerouslySetInnerHtml in react.

    Waiting on Mitosis features / Documentation

    Not Currently available for Alpine.js

    • onUnMount hook: Doesn't exist in Alpine.js as of v3.
    opened by sbrow 12
  • Angular: Template literals inside render body break

    Angular: Template literals inside render body break

    Not a huge problem but FYI its difficult to work with template literals in mitosis (and more if you're compiling to angular)

    Code:

    export default function Button(props: ButtonProps) {
      return <button class={`pa-button ${props.variant ? `pa-button--${props.variant}` : ''} `}>{props.children}</button>;
    }
    

    Result:

    import { Component, Input } from "@angular/core";
    
    @Component({
      selector: "button",
      template: `
        <button
          [class]="\`pa-button \${variant ? \`pa-button--\${variant}\` : ''} \`"
        >
          <ng-content></ng-content>
        </button>
      `,
    })
    export default class Button {
      @Input() variant: any;
      @Input() children: any;
    }
    

    The problem is that you're transforming to strings, the bundler cannot understand the template literal inside (this is not happening in react or vue)

    Fix (obvious fix... hah)

    export default function Button(props: ButtonProps) {
      return <button class={'pa-button ' + props.variant ? 'pa-button--' + props.variant : ''}>{props.children}</button>;
    }
    

    Result:

    import { Component, Input } from "@angular/core";
    
    @Component({
      selector: "button",
      template: `
        <button [class]="'pa-button ' + variant ? 'pa-button--' + variant : ''">
          <ng-content></ng-content>
        </button>
      `,
    })
    export default class Button {
      @Input() variant: any;
      @Input() children: any;
    }
    
    
    bug help wanted angular 
    opened by CKGrafico 12
  • Mitosis angular output accessing nativeElement when undefined

    Mitosis angular output accessing nativeElement when undefined

    I am interested in helping provide a fix!

    Yes

    Which generators are impacted?

    • [ ] All
    • [X] Angular
    • [ ] HTML
    • [ ] Qwik
    • [ ] React
    • [ ] React-Native
    • [ ] Solid
    • [ ] Stencil
    • [ ] Svelte
    • [ ] Vue
    • [ ] Web components

    Reproduction case

    https://mitosis.builder.io/?outputTab=IYOw5grgNsBOQ%3D%3D%3D&code=JYWwDg9gTgLgBAbzhAdgVTAEwIYwKYA0cArgM54BKeAZnAL5zVQQhwBEAAgEbHAA2mPFAB0wCAHoQwGBFLBSbANwAoZXgAekWHEHVsxPvGrEUAYxhiUcALIBPAMItIKPChgAKAJSJlcOKdRSeFIWSho4AF4ScipqAB5sFFsAPncUAz5PFT9UDBx8dy9I5J8%2FP2BadwBCEJAw6m8EXzK%2FKDwYYigUbLK6VT86IgBtWvqAXSz%2BuDaOrrh3Zr84zGAAN0WytuoIhFHYvpbkjb9hU4248RXVo79JvqA%3D

    Expected Behaviour

    Angular output

        if (!this.someRef?.nativeElement) {
          return;
        }
    

    Actual Behaviour

    Angular output

        if (!this.someRef.nativeElement) {
          return;
        }
    

    Additional Information

    Shows errors in the console "ERROR TypeError: Cannot read properties of undefined (reading 'nativeElement')" see stackblitz

    Also causes other issues where classes inside "classNames" function do not appear in the dom when they should.

    bug 
    opened by chadalen 11
  • Question: Why are you using Solid's createMutable?

    Question: Why are you using Solid's createMutable?

    I wasn't sure if I should open an issue about this but I saw that you are using Solid' createMutable which is not recommended and is intended mostly for easier transition from libraries with similar APIs. Other than not having read and write segregation it also leads to over subscription. Maybe you guys are aware of that already, just wanted to make sure.

    enhancement core solid 
    opened by orenelbaum 11
  • How do I run this project on my local machine?

    How do I run this project on my local machine?

    When I try yarn install in root path - It throughs an error

    error Package "" refers to a non-existing file '"/xxx/xxx/Documents/codesmith-ptri3/core"'. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Error: Package "eslint-plugin-mitosis" refers to a non-existing file '"/xxx/xxx/Documents/codesmith-ptri3/eslint-plugin"'. at MessageError.ExtendableBuiltin (/xxx/xxx/.nvm/versions/node/v14.15.3/lib/node_modules/yarn/lib/cli.js:721:66) at new MessageError (/xxx/xxx/.nvm/versions/node/v14.15.3/lib/node_modules/yarn/lib/cli.js:750:123) at FileResolver.<anonymous> (/xxx/xxx/.nvm/versions/node/v14.15.3/lib/node_modules/yarn/lib/cli.js:50230:15) at Generator.next (<anonymous>) at step (/xxx/xxx/.nvm/versions/node/v14.15.3/lib/node_modules/yarn/lib/cli.js:310:30) at /xxx/xxx/.nvm/versions/node/v14.15.3/lib/node_modules/yarn/lib/cli.js:321:13

    ENV: yarn -v: 1.22.10 MacOS Big Sur

    Please let me know if there is more info I can provide to troubleshoot. TY

    opened by aramay 11
  • Feature/fiddle add lint

    Feature/fiddle add lint

    Description

    Add a short description of:

    • what changes you made,
    • why you made them, and
    • any other context that you think might be helpful for someone to better understand what is contained in this pull request.

    This sort of information is useful for people reviewing the code, as well as anyone from the future trying to understand why changes were made or why a bug started happening.

    fix #768

    opened by decadef20 10
  • fix: wrap mobx react components with state in an observer

    fix: wrap mobx react components with state in an observer

    Description

    This relates to Issue 794: https://github.com/BuilderIO/mitosis/issues/794

    I added a snapshot test at the very least. I don't think we have enough tests to catch regressions for all the edge cases such as when there is a forwardRef. I might have missed it though.

    I did however functionally test it in a local project after monkey-patching the generator file with my modified code. Worked just fine.

    I'm happy to make any changes needed.

    example output:

    import * as React from "react";
    import { useLocalObservable, observer } from "mobx-react-lite";
    import { generateData, SIZE } from "./avatar-beam.utils";
    
    function AvatarBeam(props: any) {
      const state = useLocalObservable(() => ({
        get data() {
          return generateData(props.name, props.colors);
        },
      }));
    
      return (
        <svg
          fill="none"
          role="img"
          xmlns="http://www.w3.org/2000/svg"
          viewBox={"0 0 " + SIZE + " " + SIZE}
          width={props.size}
          height={props.size}
        >
          {props.title ? <title>{props.name}</title> : null}
    
          <mask
            id="mask__beam"
            maskUnits="userSpaceOnUse"
            x={0}
            y={0}
            width={SIZE}
            height={SIZE}
          >
            <rect
              fill="#FFFFFF"
              width={SIZE}
              height={SIZE}
              rx={props.square ? undefined : SIZE * 2}
            />
          </mask>
    
          <g mask="url(#mask__beam)">
            <rect width={SIZE} height={SIZE} fill={state.data.backgroundColor} />
    
            <rect
              x="0"
              y="0"
              width={SIZE}
              height={SIZE}
              transform={
                "translate(" +
                state.data.wrapperTranslateX +
                " " +
                state.data.wrapperTranslateY +
                ") rotate(" +
                state.data.wrapperRotate +
                " " +
                SIZE / 2 +
                " " +
                SIZE / 2 +
                ") scale(" +
                state.data.wrapperScale +
                ")"
              }
              fill={state.data.wrapperColor}
              rx={state.data.isCircle ? SIZE : SIZE / 6}
            />
    
            <g
              transform={
                "translate(" +
                state.data.faceTranslateX +
                " " +
                state.data.faceTranslateY +
                ") rotate(" +
                state.data.faceRotate +
                " " +
                SIZE / 2 +
                " " +
                SIZE / 2 +
                ")"
              }
            >
              {state.data.isMouthOpen ? (
                <path
                  fill="none"
                  strokeLinecap="round"
                  d={"M15 " + (19 + state.data.mouthSpread) + "c2 1 4 1 6 0"}
                  stroke={state.data.faceColor}
                />
              ) : (
                <path
                  d={"M13," + (19 + state.data.mouthSpread) + " a1,0.75 0 0,0 10,0"}
                  fill={state.data.faceColor}
                />
              )}
    
              <rect
                stroke="none"
                x={14 - state.data.eyeSpread}
                y={14}
                width={1.5}
                height={2}
                rx={1}
                fill={state.data.faceColor}
              />
    
              <rect
                stroke="none"
                x={20 + state.data.eyeSpread}
                y={14}
                width={1.5}
                height={2}
                rx={1}
                fill={state.data.faceColor}
              />
            </g>
          </g>
        </svg>
      );
    }
    
    const observedAvatarBeam = observer(AvatarBeam);
    export default observedAvatarBeam;
    
    

    fixes #794

    opened by cmgriffing 10
  • E2E cleanup Vue and React, add Qwik

    E2E cleanup Vue and React, add Qwik

    Improve the Vue support by working more closely to how the Builder SDKs work.

    Simplify React and Solid examples by importing from the "barrel".

    Coming next: add Qwik E2E.... once I can get the Mitosis Qwik output accepted by Qwik.

    opened by kylecordes 9
  • Component per file pattern

    Component per file pattern

    I was wondering, what's the reason for choosing the "react-style" source code layout of components - as opposed to a more Svelte-like code layout, where every file is implicitly a component that can be instantiated?

    To illustrate what I mean - taking this example:

    import { useState } from "@builder.io/mitosis";
    
    export default function MyComponent(props) {
      const [name, setName] = useState("Steve");
    
      return (
        <div>
          <input
            css={{
              color: "red",
            }}
            value={name}
            onChange={(event) => setName(event.target.value)}
          />
          Hello! I can run in React, Vue, Solid, or Liquid!
        </div>
      );
    }
    

    You could instead have something like:

    let name = "Steve";
    
    function setName(event) {
      name = event.target.value;
    }
    
    export default (
      <div>
        <input
          css={{
            color: "red",
          }}
          value={name}
          onChange={setName}
        />
        Hello! I can run in React, Vue, Solid, or Liquid!
      </div>
    );
    

    Obviously this isn't meaningful Typescript on it's own - this pattern assumes a component-per-file pattern (which most people will likely prefer anyway) and the compiler would take care of all the instance-related stuff, binding variables to reactive state containers, etc.

    Since your intermediary format is just JSON, implementing something like this wouldn't require much more than the TS parser API and an analysis layer that identifies reactive variables and so on.

    Thoughts? 🙂

    opened by mindplay-dk 9
  • Error: Vue 2 template should have a single root element when <Context.Provider> as root

    Error: Vue 2 template should have a single root element when as root

    I am interested in helping provide a fix!

    Yes

    Which generators are impacted?

    • [ ] All
    • [ ] Angular
    • [ ] HTML
    • [ ] Qwik
    • [ ] React
    • [ ] React-Native
    • [ ] Solid
    • [ ] Stencil
    • [ ] Svelte
    • [X] Vue
    • [ ] Web components

    Reproduction case

    https://mitosis.builder.io/?outputTab=G4VwpkA%3D&code=JYWwDg9gTgLgBAbzgVwM4FMAi6BmBDZAGxgAUoIxU4BfOHckOAcgAEAjZYQgE3SgDpgEAPQhgMCKmComAKFCRYcAOJRg3AMIQAdjHQAPePQiMm%2FYQHM13fgGMdew%2F0Lj0c2QcXxe%2BIkeTatjBC2irWABRg5JQAlIiycCgY2L7EZBSo4QgJiXD2hMgg2gBccACsADQ5iRbIMHpQpQAMVYnUMbKdiVDoMMhQoeHVcAA8qupaugYw%2FOkAbup8cHN4BegAvAhI%2BYUlcFEZdhAFRRVwtfV8pQeU%2FBcNNNQAfMOJI9zAc08IN6h2ABZcbg9bTUEbCD5fODDcHjTQOaazcgLXhQF6JDrUWRAA%3D%3D

    Expected Behaviour

    import { useDefaultProps } from '@builder.io/mitosis'
    import GridContext from './grid.context.lite'
    
    export default function Grid(props) {
      useDefaultProps({
        column: 5,
        gutter: 0,
      })
    
    
      return (
        <GridContext.Provider value={{ column: props.column, gutter: props.gutter }}>
          <div>{props.children}</div> 
        </GridContext.Provider>
      )
    }
    

    above the code, <GridContext.Provider> as root, mitosis build target (vue2), compiler work, both command line and fiddle

    Actual Behaviour

    above the code, <GridContext.Provider> as root, mitosis build target (vue2), compiler error, both command line and fiddle

    react_devtools_backend.js:4012 Error: Vue 2 template should have a single root element
        at Fragment (574.fd986b20c812e7c0.js:1:141304)
        at e (574.fd986b20c812e7c0.js:1:145164)
        at 574.fd986b20c812e7c0.js:1:153067
        at Array.map (<anonymous>)
        at 574.fd986b20c812e7c0.js:1:153043
        at 574.fd986b20c812e7c0.js:1:371561
        at s (main-79e130091ee21132.js:1:86890)
        at Generator._invoke (main-79e130091ee21132.js:1:86678)
        at forEach.e.<computed> [as next] (main-79e130091ee21132.js:1:87313)
        at r (105.417418edac50b8fd.js:2008:3776629)
        at s (105.417418edac50b8fd.js:2008:3776832)
    

    Additional Information

    add div to <GridContext.Provider> should avoid this error,but I think it still a problem。

    work link

    bug 
    opened by kingzez 1
  • Angular standalone output still generates NgModule

    Angular standalone output still generates NgModule

    I am interested in helping provide a fix!

    No

    Which generators are impacted?

    • [ ] All
    • [X] Angular
    • [ ] HTML
    • [ ] Qwik
    • [ ] React
    • [ ] React-Native
    • [ ] Solid
    • [ ] Stencil
    • [ ] Svelte
    • [ ] Vue
    • [ ] Web components

    Reproduction case

    N/A

    Expected Behaviour

    The standalone option for the Angular output target should prevent an NgModule from being generated.

    Actual Behaviour

    When the standalone option is provided to the Angular output target, the Angular code still generates an NgModule.

    As per the Angular docs:

    Components, directives, and pipes can now be marked as standalone: true. Angular classes marked as standalone do not need to be declared in an NgModule (the Angular compiler will report an error if you try).

    Additional Information

    No response

    bug good first issue angular 
    opened by R-Bower 1
  • feat: dev script for mitosis cli

    feat: dev script for mitosis cli

    The main changes made were in the packages/cli/src/build/dev.ts file and packages/cli/src/commands/dev.ts.

    Basically, it runs something like the "build" command on each file change, only on the files changed.

    opened by rgodha24 3
  • Generation of Vue 2 classes could possibly avoid _classStringToObject

    Generation of Vue 2 classes could possibly avoid _classStringToObject

    I am interested in helping provide a fix!

    Yes

    Which generators are impacted?

    • [ ] All
    • [ ] Angular
    • [ ] HTML
    • [ ] Qwik
    • [ ] React
    • [ ] React-Native
    • [ ] Solid
    • [ ] Stencil
    • [ ] Svelte
    • [X] Vue
    • [ ] Web components

    Reproduction case

    https://mitosis.builder.io/?outputTab=G4VwpkA%3D&inputTab=M4NwpgNgLmQ%3D&code=DwZwxgTglgDgLgPgFAAIUFMAeMD2E4oA26BAJlCAIYBGxpKAvCgGaWEjoDcqRJLOYAK4hGKOBEFckwAPTho8ZNKgA7GIIJhClECAYAiZngC2AWlXq4%2BlFp0gAXOSq109W7vtGhImQiA%3D

    Expected Behaviour

    The Vue 2 output in the the Class Directive example uses minimal Vue code, e.g.

    <input
        class="form-input"
        :class="{disabled: disabled, focus: focus}"
    />
    

    Actual Behaviour

    The Vue 2 output in the Class Directive uses code which is quite verbose, converting a string into a class with a _classStringToObject helper:

      <input
        :class="
          _classStringToObject(
            `form-input ${disabled ? 'disabled' : ''} ${focus ? 'focus' : ''}`
          )
        "
      />
    

    Additional Information

    No response

    bug 
    opened by euoia 1
  • SolidJS: migrate `css` prop solution to solid-styled

    SolidJS: migrate `css` prop solution to solid-styled

    Migrate our approach for the css prop in the SolidJS generator from using https://github.com/solidjs/solid-styled-components to using https://github.com/lxsmnsyc/solid-styled (as recommended by some folks in the SolidJS Community)

    enhancement good first issue solid 
    opened by samijaber 2
  • `props.children` should support transforming children?

    `props.children` should support transforming children?

    I am interested in helping provide a fix!

    Yes

    Which generators are impacted?

    • [ ] All
    • [ ] Angular
    • [ ] HTML
    • [ ] Qwik
    • [X] React
    • [ ] React-Native
    • [ ] Solid
    • [ ] Stencil
    • [ ] Svelte
    • [X] Vue
    • [ ] Web components

    Reproduction case

    none

    Expected Behaviour

    In UI component development, space component need transforming children and each child need add specific class, React recommended to use exposing-multiple-components, but I think use multiple-components is not good DX for UI component user. Any good idea?

    https://github.com/ant-design/ant-design-mobile/blob/56675ff887016ebec115666b2a7021d247d3a671/src/components/space/space.tsx#L44-L51

    https://github.com/youzan/vant/blob/7c35b143dd7493c9e1ffad64285673f3881d194a/packages/vant/src/space/Space.tsx#L96-L117

    Actual Behaviour

    none

    Additional Information

    No response

    bug 
    opened by kingzez 1
Write JSX-driven components with functions, promises and generators.

Crank.js Write JSX-driven components with functions, promises and generators. Documentation is available at crank.js.org. Crank.js is in a beta phase,

null 2.5k Jan 1, 2023
Frontend compiler, inspired by Svelte

Malina.js Malina.js builds your web-application to use it without framework on frontend side. Therefore your web-app becomes thinner and faster, and t

Malina.js 1.1k Dec 29, 2022
Write you own GitHub webhooks with Deno Deploy.

Hooray Write you own GitHub webhooks with Deno Deploy. Deno Deploy is where you can distribute your JavaScript/TypeScript code to the edge with one li

null 3 Jun 22, 2022
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

Fast 3kB alternative to React with the same modern API. All the power of Virtual DOM components, without the overhead: Familiar React API & patterns:

Preact 33.6k Jan 8, 2023
Kunlun architecture element generation based on Angular schematics 🎬

A fullstack(NestJS、React) framework for building efficient and scalable applications. Description The Kunlun CLI is a command-line interface tool that

图灵人工智能研究院前端技术团队 8 Aug 1, 2022
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Supporting Vue.js Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome ba

vuejs 201.6k Jan 7, 2023
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

vue-next This is the repository for Vue 3.0. Quickstart Via CDN: <script src="https://unpkg.com/vue@next"></script> In-browser playground on Codepen S

vuejs 34.6k Jan 4, 2023
利用uniapp+tailwindcss+uview+vue-cli搭建的一套基础模板,可以使用Webstorm或者vscode开发。集成miniprogram-ci自动部署

uniapp-tailwind-uview-starter 利用uniapp+tailwindcss+uview+sass搭建的一套基础模板,并且集成了miniprogram-ci实现自动构建上传微信小程序。 tailwindcss以及flex布局的css工具拓展 miniprogram-ci集成,

XLZY 81 Dec 27, 2022
A blazing fast React alternative, compatible with IE8 and React 16.

Nerv is a virtual-dom based JavaScript (TypeScript) library with identical React 16 API, which offers much higher performance, tinier package size and

null 5.4k Jan 4, 2023
The simplest way to create web components from plain objects and pure functions! 💯

?? One of the four nominated projects to the "Breakthrough of the year" category of Open Source Award in 2019 hybrids is a UI library for creating web

hybrids 2.7k Dec 27, 2022
A Web Component compiler for building fast, reusable UI components and static site generated Progressive Web Apps

Stencil: A Compiler for Web Components and PWAs npm init stencil Stencil is a simple compiler for generating Web Components and static site generated

Ionic 11.3k Jan 4, 2023
Re-developed the Sky Ice Cream website using ReactJS. Redesigned the UI to a much more appealing and intuitive styling.

This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: npm start Runs the app in the developmen

Aakash Jana 1 Dec 27, 2021
jCore - JavaScript library for building UI components

JavaScript library for building UI components

iOnStage 11 Jan 21, 2022
Shoelace - A collection of professionally designed, every day UI components built on a framework-agnostic technology. 🥾

Shoelace A forward-thinking library of web components. Works with all frameworks ?? Works with CDNs ?? Fully customizable with CSS ?? Includes an offi

Shoelace 7.7k Dec 26, 2022
Fest - A reuseable UI components builder for the web

fest Fest is actually fast. A reuseable UI components builder for the web. Rerender components or parts of components as users interact with your app.

Bismark Yamoah 3 Jul 6, 2022
🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)

English | 简体中文 dva Lightweight front-end framework based on redux, redux-saga and react-router. (Inspired by elm and choo) Features Easy to learn, eas

null 16.1k Jan 4, 2023
Relay is a JavaScript framework for building data-driven React applications.

Relay · Relay is a JavaScript framework for building data-driven React applications. Declarative: Never again communicate with your data store using a

Facebook 17.5k Jan 1, 2023
:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

Inferno is an insanely fast, React-like library for building high-performance user interfaces on both the client and server. Description The main obje

Inferno 15.6k Dec 31, 2022