Overview
LiveCodes provides ready-to-use starter templates for every supported language and framework. Each template includes:
- Pre-configured editor setup
- Sample code demonstrating core features
- Required dependencies and imports
- Best practices and conventions
Using Templates
Access Templates
Click New → Starter Templates from the app menu
Browse & Search
Browse by category or search for a specific framework
Select & Start
Click a template to load it immediately
You can also create a new project from a template by visiting:
https://livecodes.io/?template=<template-name>
Popular Templates
JavaScript Frameworks
React
import { useState } from 'react';
export default function App() {
const [count, setCount] = useState(0);
return (
<button onClick={() => setCount(count + 1)}>
Clicked {count} times
</button>
);
}
Vue 3
<script setup>
import { ref } from 'vue';
const count = ref(0);
</script>
<template>
<button @click="count++">
Clicked {{ count }} times
</button>
</template>
Svelte
<script>
let count = 0;
</script>
<button on:click={() => count++}>
Clicked {count} times
</button>
Solid
import { createSignal } from 'solid-js';
export default function App() {
const [count, setCount] = createSignal(0);
return (
<button onClick={() => setCount(count() + 1)}>
Clicked {count()} times
</button>
);
}
UI Libraries
Styling
Data Visualization
Game Development
- Tailwind CSS - Utility-first CSS
- Bootstrap - Component library
- DaisyUI - Tailwind component library
- shadcn/ui - Re-usable components
- D3.js - Data-driven documents
- Plotly - Scientific charts
- Diagrams - Mermaid, Graphviz, etc.
- Phaser - 2D game framework
Language Templates
Every supported language has a starter template:
const title = document.querySelector<HTMLElement>("#title");
const counter = document.querySelector<HTMLElement>("#counter");
const button = document.querySelector<HTMLButtonElement>("#counter-button");
if (title) title.innerText = "TypeScript";
let count: number = 0;
button?.addEventListener("click", () => {
count++;
if (counter) counter.innerText = String(count);
});
from browser import document
def increment(event):
global count
count += 1
document["counter"].text = str(count)
document["title"].text = "Python"
count = 0
document["counter-button"].bind("click", increment)
package main
import (
"fmt"
"syscall/js"
)
func main() {
document := js.Global().Get("document")
document.Call("querySelector", "#title").Set("innerText", "Go")
count := 0
cb := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
count++
document.Call("querySelector", "#counter").Set("innerText", fmt.Sprint(count))
return nil
})
document.Call("querySelector", "#counter-button").Call("addEventListener", "click", cb)
select {}
}
Template Structure
Each template includes:
- HTML (Markup) - Page structure
- CSS (Style) - Styling and layout
- JavaScript/Language (Script) - Logic and interactivity
- External Resources - CDN links for dependencies
- Configuration - Language-specific settings
Creating Custom Templates
Build Your Project
Create and configure your project in LiveCodes
Save Configuration
Export your project as JSON from the menu
Load as Template
Import the JSON configuration to reuse across projects
You can also share template URLs with query parameters or create templates via the SDK.
Blank Template
Start from scratch with the Blank template:
- No pre-written code
- No external dependencies
- Choose your own languages
- Languages - See all supported languages
- Import - Import code from other sources
- Export - Save and share your projects