1. Reference
  2. Media

<pixels>

A grid of on/off cells painted in one go: pixel art, or a frame of an animation held in a variable.

Media
pixels.ham
<column style="gap-8 w-full items-center">
    <block style="w-160">
        <pixels data="00100100/00111100/01011010/01111110/00111100/00100100/01000010/00000000"
                color="teal-600"
                style="w-full"/>
    </block>
    <text style="muted">Space invader, 8 × 8</text>
</column>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
background
also bg
Off cells (default: none).
color
color On cells (default: the text color).
color
cols Cells per row (default: the longest row).
number
data The rows of 1/0 (or #/.) joined by / or line breaks.
string

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

This page is also Markdown, and all of HAM is in llms.txt.