Code playground
This page demonstrates code presentation features. Examples show basic data and local UI interactions; they do not call the eduskit SDK or connect to a classroom service.
Code in multiple languages
Select a language tab to switch examples. Use the button at the top right of a code block to copy it.
- TypeScript
- Swift
- Kotlin
classroom.ts
const classroom = {
id: 'demo-classroom',
role: 'teacher',
};
console.log(classroom.id);
Classroom.swift
let classroom = [
"id": "demo-classroom",
"role": "teacher"
]
print(classroom["id"] ?? "")
Classroom.kt
val classroom = mapOf(
"id" to "demo-classroom",
"role" to "teacher"
)
println(classroom["id"])
Live editing and preview
Edit the JSX below to update the preview immediately. Click the preview button to try local React state changes.
Live Editor
function ClassroomCounter() { const [count, setCount] = useState(0); return ( <div style={{ padding: 20 }}> <p>Classroom interactions: {count}</p> <button type="button" className="button button--primary" onClick={() => setCount(count + 1)}> Add an interaction </button> </div> ); }
Result
Loading...
Configuration and highlighting
JSON examples can explain configuration fields. These values are illustrative and are not valid credentials.
example.json
{
"classroomId": "demo-classroom",
"displayName": "Demo teacher"
}
Reading tip
This site supports light and dark themes, language switching, page navigation and full-text search. Real classroom examples will be added alongside the SDK guides.