Vue Live renders vue code in the browser
4 |5 | vue-live is a VueJs component. It renders the code passed in prop 6 | using the VueJs compiler - yes exactly like the vuejs compiler. But wait! 7 | it has a super-power! It keeps the rendered code reactive in the 8 | browser. 9 |
10 |11 | If you edit the code in the editor on the left, the preview on the right 12 | will update automatically. 13 |
14 | 15 |Vue SFC
25 |26 | If this format is not fitting for you, vue-live renders VueJs single 27 | file components as well 28 |
29 |VSG partial mode or pure template
31 |Pure JavaScript code
33 |Or if you prefer to, use the new Vue() format
34 |Extra dependencies
36 |37 | Use the requires prop to make libraries and packages available in 38 | the browser 39 |
40 |Custom delay
42 |43 | When updates should not happen too often, for instance when a component 44 | need a lot of computing power to render, one can change the standard 45 | throttle timing. 46 |
47 |Default Layout
50 |Custom Layout
54 |Attributes available for custom layout:
56 |
57 | code: String, language: String,
58 | components: Object, requires: Object, ...
59 | all props passed in the
60 | layoutProps
61 |
JSX
66 |TSX
69 |Double Root
72 |Separate components for Editor and Preview
75 |80 |
Edit the code here
81 |