Skip to content

Examples

Your basic configuration of a web application built with Ice Cream is provided here, there are 3 branches in the GitHub example repository.

  1. main
  2. javascript
  3. typescript

NOTE

main and javascript are the same because the default Ice Cream variant is JavaScript.

More examples of Ice Cream apps are

  1. Hello, world!
js
render('app',`
<h1>Hello, world!</h1>
`,
` 
body {
    font-family:Arial, sans-serif;
}
`)
ts
render('app',`
<h1>Hello, world!</h1>
`,
` 
body {
    font-family:Arial, sans-serif;
}
`)
  1. Returning functions
js
function myCSS() {
    return (
        ```
        body {
            font-family:Arial, sans-serif;
        }
        ```
    )
}

render('app',`
<h1>Hello, world!</h1>
`,
` 
${myCSS()}
`)
ts
render('app',`
<h1>Hello, world!</h1>
`,
` 
body {
    font-family:Arial, sans-serif;
}
`)

There is no difference between TypeScript and JavaScript's variant of the render() function, since you're just writing HTML and CSS code.

Make Your Own Example!

To make your own example project fork the example project over on Replit and open an issue on the .github repository on our GitHub over here linking your fork of the Replit project, and it'll be linked in the Community Examples section of this page.

Community Examples

These are all community examples reviewed by @myferr on GitHub.

There are no community examples currently.

What's Next?

Next up you'll check out the rest of the documentation.

Documentation

Table of Contents

What is Ice Cream JS?
Getting Started
👁️ Examples
Rendering