Pixel Art
import { PixelArt, PixelFrame, PixelSteps, PixelBuffer, shapes } from "pleate/effects/pixel-art";Drawings
Two from the gallery and one made here, in the accent color of the theme.
Frames and steps
PixelFrame goes around any pleate component. Press a square to pick a step.
Harvest
Props
- PixelArt art
A drawing of the gallery or your own buffer. It renders on the server.
drawing | PixelBuffer- PixelArt colors
Swaps colors, for example to theme variables.
Record<string, string>- PixelArt label
Accessible name; without it the drawing is decorative.
string- PixelFrame step / shadow / color
Corner step, hard shadow and border color.
number (px) / number (px) / stringdefault 2 / 4 / var(--pl-fg)- PixelSteps steps / current / onSelect
Squares for the steps of a scene. Inside a ScrollScene it follows the scroll; with onSelect they are buttons.
number | string[] / number / (step) => void- new PixelBuffer(size)
The drawing surface. shade() lights a shape from the top left with a ramp of tones.
shade, fill, speckle, rect, ellipse, line, dots, stamp, outline, draw- shapes
Shapes to fill or shade.
rect, ellipse, polygon, taper, and, or, not
Accessibility
- A drawing with a label is a named image; without one it is hidden from screen readers.
- PixelSteps is a list that marks the current step, with real buttons when it can be pressed.
- PixelFrame keeps a visible focus ring outside the stepped corners.