Grid Serpent
gamesProEn slange, der spiller sig selv på et pixelgitter: den jager mad med stifinding, vokser uendeligt og blinker og starter forfra, når den spærrer sig selv inde. Halen toner ud i brættet. Cellestørrelse, mellemrum, radius, farver, fart og vækst er props.
Introduktionspris til og med 31. december 2026. Derefter 79 €.
Preview
Live demo. Temaet skifter selve demoen.
Kode
Koden er låst
Grid Serpent er en del af Manniche UI Pro. En nøgle åbner kildekoden til alle 66 effekter.
Køb · 49 €49 € · Introduktionspris til og med 31. december 2026. Derefter 79 €.
- Engangsbetaling
- Én udvikler
- Log ind og opret din nøgle med det samme
- Ingen moms (§ 19 UStG)
Har du en nøgle? Hent koden med CLI eller MCP.
Nøglen ligger i MANNICHE_PRO_KEY, aldrig i koden eller i adressen. Sådan sætter du den op
npx shadcn@latest add @manniche-pro/grid-serpentclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
GridSerpentProps
| Prop | Type | Standard | Hvad den gør |
|---|---|---|---|
cellSize | number | 16 | Side of one cell in CSS pixels. The board fills its container, so a smaller cell means a bigger grid. |
gap | number | 3 | Space between cells in CSS pixels. |
radius | number | 4 | Corner radius of a cell, in CSS pixels. Half the cell size makes dots, 0 makes square pixels. |
snakeColor | string | 'var(--foreground)' | Colour of the snake's head; the body fades from it towards the board. Any CSS colour, including var(--x). Defaults to the foreground token. |
foodColor | string | 'var(--primary)' | Colour of the food. Defaults to the primary token. |
boardColor | string | 'var(--muted)' | Colour of the empty cells. Defaults to the muted token. |
flashColor | string | 'var(--destructive)' | Colour the snake blinks in when it corners itself. Defaults to the destructive token. |
speed | number | 16 | Steps per second. |
growth | number | 4 | Segments added to the snake for every piece of food. |
maxFill | number | 0.1 | How full the board may get, from 0.02 to 0.9. Past this share of the cells the snake stops being careful, corners itself, flashes and starts again. Raise it for longer lives, lower it for a quick cycle. Up to 0.12 the snake hunts the food directly, which is quick. Above that it follows a loop through the board, which is slower to reach the food but never dies on its own, so it can fill the board. |
seed | number | 7 | Seed for the food placement, so every visit plays out the same. Changing it starts a new game right away. |
feedable | boolean | true | Click or tap a free cell to drop the food there (never blocks scrolling). By keyboard, tab to the board, aim with the arrow keys and press Enter or Space; a hint shows while it is focused. |
label | string | – | Accessible label. When set the board is exposed as an image, otherwise it is hidden from assistive technology. |
className | string | – | Classes for the wrapper. It fills its parent, so give it a size or put it in a sized box. |
A11y
Tastatur
With feedable the board takes focus with Tab and shows an aim cursor and a hint. Arrow keys move the aim, Enter or Space drops the food there, and the result is announced. A click or tap on a free cell does the same.
Skærmlæser
With feedable the board is a group named by label (or Snake board) with the keys in its name; otherwise the canvas is aria-hidden unless label is set, which makes it an image with that name.
Mindre bevægelse
Under reduced motion one still frame is drawn.