▶ Watch
Guides

What is TenkJS? A beginner's guide to tiny JavaScript creations

Discover TenkJS: a feed of interactive JavaScript creations in 10 KB, with games, art, source code and a simple path to sharing your own.

← All guides ·

TenkJS is a place to discover small, interactive JavaScript creations. Open the website and you arrive in a feed of live experiments: moving patterns, tiny games, playful simulations, colourful effects and other things people have made with code. You can enjoy them without knowing how they work, or look at their source to understand the ideas behind them.

The central idea is simple: every creation, called a tenk, fits into a single JavaScript file of no more than 10,240 bytes. That limit gives the site its name and its character. Instead of building a large application, creators choose one idea and see how much life they can give it within a small space.

A feed of programs you can play with

At first glance, the experience feels familiar. One creation occupies the main stage, and you move through the feed by scrolling or swiping. The difference is what sits inside that stage. You are running a program, rather than watching a video of one.

A pattern might react to your pointer. A game might ask you to steer or jump. A drawing toy might turn a drag into a trail of colour. Some tenks are meant to be watched; others only reveal their idea when you interact. Read the description, try the controls it mentions, and give an interesting creation a little time to show what it does.

What counts as a tenk?

A tenk is the uploaded JavaScript that powers an individual creation. It might draw with the browser's two-dimensional canvas tools, create a WebGL scene, animate particles, or implement a compact game. The format encourages self-contained work that can start quickly inside the feed.

The website provides a drawing surface and the environment around it. Creators supply the behaviour. This means a tenk does not need a whole website project, a navigation system or a collection of pages. A few lines that produce a satisfying visual response can be enough. The size of the idea matters much less than how clearly it comes across.

Why the 10 KB limit matters

Ten kilobytes is a creative budget. It encourages you to ask what is essential: the movement, the interaction, the colour, the rule that makes something surprising. Removing the rest can make a small experiment stronger.

You do not have to be an expert at compressing code to take part. Many interesting sketches fit comfortably within the limit while remaining readable. Start by making something work, then check its file size. If it is too large, simplify the design before chasing tiny savings. A focused animation with one good interaction is often more memorable than a crowded experiment trying to do everything at once.

You can enjoy it without writing code

TenkJS is for people who like making things, but it is also for people who simply like exploring them. You do not need a programming background to scroll through the feed, play a game, like a favourite or share a link.

Think of each tenk as a small invitation. One might offer a moment of calm; another might be a challenge or a visual joke. You can spend a few seconds on each, or stay with something that catches your attention. There is no required route through the site and no lesson you must complete before you are allowed to enjoy it.

Two ways to discover creations

The feed offers Latest and Trending. Latest is the place to explore newly published work, with featured creations potentially appearing ahead of other entries. Trending provides another route through the collection, using activity such as likes and views along with a boost for recent work.

Neither view requires you to know exactly what you want. Switch between them when the feed starts to feel familiar. Latest helps you notice something fresh; Trending can help you find creations attracting attention. They are discovery tools, rather than a judgement of what you should like. Your favourite may be something quiet that rewards a closer look.

Browsing with more intention

If you do have a particular interest, open the side panel and choose Browse. You can search for tenks, creators and tags, and use the tag buttons to narrow what appears. This is useful when you want a game, a certain visual style, or more work related to something you have already enjoyed.

Try a broad search first. A word such as “particles” or “game” gives you a direction without demanding an exact title. If the results are sparse, remove a filter or try another term. Tags reflect how creations are described, so two related experiments may use different words for similar ideas.

Small interactions are part of the artwork

The feed's controls and a tenk's controls serve different purposes. The site lets you move between creations, replay them, like them and share them. The program inside the frame decides what a tap, drag or key does within that experiment.

That distinction explains why an arrow key or a swipe can sometimes behave differently from one tenk to the next. A game may need that input itself. If an interaction does not move the feed, use the site's previous and next controls, or try the area around the frame. The description is usually the best place to look for instructions specific to a creation.

Replaying, liking and sharing

Replay starts a tenk again, which is helpful when you missed its opening or want another attempt at a game. On a keyboard, the site also offers R for replay and L for liking, when those shortcuts are handled by the feed.

Likes are a simple way to show appreciation. They should not be treated as a permanent, account-based collection across every device: the website remembers liked tenks in the browser. Sharing is better when you want to keep a particular creation's address. Each tenk has its own link, so someone else can land directly on the work you wanted them to see.

Source code makes discovery deeper

One of the most useful features is View source. It lets you inspect the JavaScript behind a creation. You do not have to understand every line for this to be worthwhile. Look for a colour value, a drawing command, a loop or an event handler, and connect it to something you can see.

For beginners, this turns the feed into a collection of concrete examples. For experienced developers, it offers a quick way to investigate an effect or a compact implementation. Reading source can inspire your own experiments, but visibility alone does not settle permission to reuse someone else's work. Respect creators and any stated licence.

What the sandbox means

Every tenk runs inside a restricted browser frame. This separates the uploaded program from the surrounding website and limits what it can access. External network requests, browser storage access and attempts to reach the parent page are among the things the platform restricts.

For viewers, the practical point is that a tenk is designed to behave as an isolated experiment. For creators, the sandbox is part of the design brief. Build an idea that works on its own, using the supported drawing and interaction tools. A program that depends on fetching an image, contacting a server or reading saved browser data needs a different approach here.

Libraries and sound

Small does not have to mean starting every technique from scratch. The submission form offers a selection of supported libraries for particular jobs. A creator can choose the ones their code uses instead of trying to load arbitrary scripts from another website.

Sound has a specific supported route: ZzFX, selected as a library when submitting. It is intended for small synthesized effects, and playback depends on the viewer interacting with the tenk. Do not assume every creation has sound or that an experiment is broken because it starts quietly. Creators should make the visual interaction understandable even before a viewer chooses to listen.

A simple canvas is enough to begin

If you want to make a tenk, the starting point is smaller than you might expect. The environment provides a canvas as c, also available as a, and the document body as b. You can ask the canvas for a drawing context and begin drawing.

Useful first projects include a bouncing shape, a field of dots, a colour wheel or a trail that follows the pointer. Animation normally uses requestAnimationFrame, letting the browser schedule each update. Read the canvas dimensions instead of assuming a particular screen size. A tenk can appear on different devices, and a layout that adapts will travel better.

From experiment to published creation

Publishing starts at Submit a tenk. You upload a JavaScript file, choose its orientation, select any supported libraries it needs, and add the information that helps people discover and understand it. The website checks the upload and provides a preview.

The normal submission flow uses an email address instead of asking you to create a public account. After submitting, follow the verification email and confirm publication on the verification page. Depending on the site's publishing settings, a verified tenk may appear immediately or wait for administrator approval. A successful upload alone does not mean it is already public.

Your title and description do real work

A clear title helps someone remember what they saw. A useful description explains what the creation does and how to interact with it. “Drag to bend the particle stream” tells a viewer more than “My first test,” even if both describe the same file.

Choose tags that match the actual experience. A small game might need different tags from a relaxing animation, and unnecessary labels make browsing less useful. You can also supply a creator name for the public display. Keep your private email separate from that public identity: it is used for the submission process and is not displayed as your byline.

Publishing is the start of an iteration

Your first version does not have to be your final version. The submission email includes a master key, which works with the submission email address to authenticate later code updates. Keep both the original message and the key somewhere safe.

Updates let you fix an awkward interaction, improve performance or develop an idea after testing it on another screen. Keep a readable source file of your own, too. If you minify code for upload, preserve the version you actually want to edit. The public file and the development file serve different purposes, and maintaining both makes the next change much easier.

A smaller brief can lead to better work

If you are unsure what to build, describe the experience in one sentence before writing code. “Move the pointer to scatter a cloud of dots” is a useful brief because you can tell when it works. “Build an amazing game” leaves too many decisions open.

Choose a clear starting state, one obvious action and a satisfying response. Then test those three things in the preview. You can add complexity later, but the first interaction should still make sense on its own. This approach is useful beyond TenkJS: a small working experiment teaches you more than a large unfinished plan, and gives other people something concrete to try.

A good place to learn by making

TenkJS works particularly well when you approach it with a small question. What happens if a circle follows a sine wave? Can a few particles suggest rain? What is the smallest rule that makes a game interesting? Each question gives you something concrete to explore.

You can learn by watching, reading and trying, in whatever order suits you. Spend a few minutes in the feed, inspect one creation that interests you, and write down a detail you would like to understand. Then use the practical getting-started guide for a walkthrough of browsing, interacting, submitting and updating. Your first tenk only needs one idea worth sharing.

Something went wrong. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.