| title | Getting Started Guide |
|---|
import CodeBlock from '@theme/CodeBlock'; import LiveCodes from '../../src/components/LiveCodes.tsx'; import RunInLiveCodes from '../../src/components/RunInLiveCodes.tsx';
export const gettingStartedParams = { html: `
`, css: `.container { max-width: 600px; margin: 50px auto; text-align: center; font-family: Arial, sans-serif; }h1 { color: #007bff; font-size: 2.5rem; }
input { padding: 10px; font-size: 1rem; margin: 10px; border: 2px solid #007bff; border-radius: 5px; }
button { padding: 10px 20px; font-size: 1rem; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; }
button:hover {
background-color: #0056b3;
}
, js: const greeting = document.getElementById('greeting');
const nameInput = document.getElementById('nameInput');
const greetBtn = document.getElementById('greetBtn');
greetBtn.addEventListener('click', () => { const name = nameInput.value.trim(); if (name) { greeting.textContent = `Hello, ${name}!`; } else { greeting.textContent = 'Hello, World!'; } }); `, };
This guide will walk you through creating your first project in LiveCodes.
Try the completed project below:
.
- A web browser (Chrome, Firefox, Safari, or Edge)
- Basic knowledge of HTML, CSS, and JavaScript
- Navigate to livecodes.io
- You'll see the editor interface with three panels:
- HTML
- CSS
- JavaScript
Let's create a simple interactive greeting card.
{gettingStartedParams.html}
{gettingStartedParams.css}
{gettingStartedParams.js}
The result panel automatically updates as you type. Try:
- Entering your name in the input field
- Clicking the "Greet Me!" button
- Modifying the colors in the CSS
- Click on the "Project" menu button in the toolbar
- Click "Save" to save the project (on this device)
- You can open it later from "Project menu > Open"
- Use "Project menu > Share" to get a permanent URL to your project that you can share
You've just built your first interactive app with LiveCodes!
Compare your version with the completed project above. Did you add any personal touches?
Now that you've created your first project, explore:
- Building Your First App - Create more complex applications
- Features - Learn about all LiveCodes features
- Templates - Use pre-built templates
- External Resources - Add libraries to your projects
- Use Ctrl/Cmd + S to manually save
- Press Ctrl/Cmd + Alt + S to open share panel
- Press Ctrl/Cmd + K to open the command menu
- Enable Auto-save in user settings for automatic saving