Devices
A device profile is what the framework knows about one panel: its dimensions, pixel ratio, interface scale, size class, and density tier. Each profile compiles into a screen--{keyname} class, so a screen states its device in one class. The platform exports the registry these profiles come from, and the framework ships the synced map.
What a device profile is
A device profile is a named set of geometry and capability values. The framework compiles each one into a
screen--<keyname> class, so a screen states
its whole device in one class.
The class publishes the profile as CSS variables on the Screen Screen Device screen dimensions, orientation, and display properties The Screen component is the outermost container that defines the device dimensions and provides global settings for your content. element, and everything inside reads them.
| Variable | What it holds |
|---|---|
--screen-w, --screen-h |
The panel's dimensions in CSS pixels. Every view and layout size derives from them. |
--pixel-ratio |
Physical-to-CSS pixel ratio. The screen scales by it, so a 2x panel still lays out in CSS pixels. |
--dither-pixel-ratio |
Ratio dither tiles render at, so patterns stay crisp on high-DPI panels. |
--device-ui-scale |
The device's native interface density factor. It composes with the Scale modifier into --ui-scale. |
--gap-scale |
Multiplier on every gap variable, for panels that need tighter or looser spacing than their size class gives. |
--device-name |
The profile keyname as a string. |
--color-depth |
The profile's depth rating, as metadata. |
--color-depth paints nothing. The mode class on
the screen picks the paint rail, so a profile rated 24 renders in grayscale the moment it wears a grayscale
class. See
Rendering Modes
Rendering Modes
The grayscale tiers and color modes a screen can carry, what each one paints, and the depth it publishes to the runtime
A rendering mode is the class that tells a screen what its panel can print. Three grayscale tiers cover the panels with no color, one class per palette covers the color panels, and the mode class publishes its own paint depth for the JavaScript runtime to read.
.
Tokens
Tokens
Complete CSS variable reference with root defaults, density, and bit-depth overrides
The Tokens reference lists every Framework CSS variable from _variables_root.scss and display overrides in _variables_overrides.scss. Use it to understand defaults, 2-bit visual/layout behavior, high-density typography, and 4-bit-and-up scaling.
lists these variables with their defaults, next to every other
framework token.
<!-- TRMNL X: 1040x780 CSS pixels at a 1.8 pixel ratio, 16 grays -->
<div class="screen screen--v2 screen--lg screen--density-2x screen--4bit">
<div class="view view--full">
<div class="layout">...</div>
</div>
</div>
Size and density
Every profile names a size (sm,
md, or
lg) and a density tier
(1x or
2x). The device class inherits both, so it needs
no extra classes to get their variables.
The classes still travel on the screen, because they are what the variant prefixes and the runtime match.
md:value--large matches
screen--md, never the device class that extends
it.
Responsive
Responsive
Adapt styles to the device's size class, orientation, and bit depth using variant prefixes
The Responsive system adapts a layout to the device it renders on. Size-based breakpoints follow the size class each device carries, and Bit-depth variants follow its color capabilities. Combine them to control how your content appears across TRMNL's range of devices.
covers the size grammar.
screen--sm,screen--md,screen--lg: the breakpoint the device sits at, and the rich text measure that goes with it.screen--density-2x: high-DPI typography, which switches the pixel fonts for Inter Variable. See Font Family Font Family Switch between Classic and TRMNL font bundles per device The Framework ships two pixel font bundles: Classic (NicoPups, NicoClean, BlockKie) and TRMNL (TRMNL12, TRMNL16, TRMNL21). Low-density displays use the selected bundle; high-density displays use Inter Variable for legibility. .- Low density is the default, so it has no class. The registry stamps
screen--density-1xas a marker, and no bundle defines rules for it.
Pick the size by the devices you want to hit rather than by a pixel count. A profile's own
--device-ui-scale and
--gap-scale handle the fine tuning inside a size.
Palettes select the mode, not the geometry
A device lists every palette its panel and its delivery pipeline can print. The palette selected for a render decides the mode class; the geometry stays the device's either way.
The two samples below are the same panel at the same dimensions, density, and scale. Only the paint changes. Color Palettes Color Palettes Every palette a screen can carry: grayscale tiers, limited ink sets, and full color, with the class each one maps to A palette tells a screen which inks its panel can print. Four grayscale palettes map onto the bit-depth classes, five limited color palettes dither every framework token down to a fixed ink set, and screen--color-full paints every token at its actual hex on 12-bit and 24-bit displays. lists the palettes and their classes.
<!-- The gray-16 palette: shades paint as solids -->
<div class="screen screen--amazon_kindle_2024 screen--sm screen--density-2x screen--4bit">...</div>
<!-- The bw palette, same device: shades paint as dither patterns -->
<div class="screen screen--amazon_kindle_2024 screen--sm screen--density-2x screen--1bit">...</div>
Rating a panel
Rate a panel by what it drives, not by what the delivery pipeline encodes. These are the four hardware classes and the depth each one takes.
| Hardware class | Depth | Palettes it can carry |
|---|---|---|
| Grayscale e-paper | 1, 2, or 4 | By gray levels: 2 levels rate 1, 4 levels rate 2, 16 levels rate 4. Each panel carries the grayscale palettes up to its own level. |
| Limited-color e-paper | 1 | Its own ink set, every smaller ink set it can print, and bw. |
| Kaleido-class color e-paper | 12 | color-12bit, which renders through screen--color-full. |
| LCD, OLED, browser, virtual | 24 | Every palette, including color-24bit. These panels can render any mode the framework has. |
There is no 8-bit or 16-bit grayscale rating. Above 16 grays the axis is color, so a panel goes to 12 or 24 rather than to a deeper gray tier.
A pipeline that sends a smooth 8-bit image is a delivery format, not a rating. The panel behind it still
prints 16 grays, and the screen still renders on
screen--4bit.
A full-color rating does not lock a device into color. Rate the profile for the glass, then render it with whichever mode class the palette selects.
The shipped device classes
Every profile in the exported registry ships a class. Some devices reuse another profile's geometry, so
they share its class: nine of them resolve to
screen--og or
screen--ogv2.
| Class | Devices | Size | Depth |
|---|---|---|---|
screen--amazon_kindle_2024 |
Amazon Kindle 2024 | sm | 4-bit |
screen--amazon_kindle_7 |
Amazon Kindle 7 | md | 4-bit |
screen--amazon_kindle_oasis_2 |
Amazon Kindle Oasis 2 | md | 4-bit |
screen--amazon_kindle_paperwhite_6th_gen |
Amazon Kindle PW 6th Gen | md | 4-bit |
screen--amazon_kindle_paperwhite_7th_gen |
Amazon Kindle PW 7th Gen | md | 4-bit |
screen--amazon_kindle_paperwhite_signature_11th_gen |
Amazon Kindle PW Signature 11th Gen | md | 4-bit |
screen--amazon_kindle_scribe |
Amazon Kindle Scribe | lg | 4-bit |
screen--amazon_kindle_voyage |
Amazon Kindle Voyage | lg | 4-bit |
screen--avalue_epd_42s |
Avalue EPD-42S 42" Display Board | lg | 4-bit |
screen--ed133ut2 |
ED133UT2 Active Matrix | lg | 4-bit |
screen--generic_16_9 |
Generic 16:9 Display | md | 4-bit |
screen--inkplate_10 |
Inkplate 10 | md | 4-bit |
screen--inkplate_13_spectra |
Inkplate 13 Spectra | md | 1-bit |
screen--inkplate_5_2 |
Inkplate 5.2 | lg | 4-bit |
screen--inkplate_6_color |
Inkplate 6COLOR | md | 1-bit |
screen--inkplate_6_plus |
Inkplate 6 Plus | lg | 4-bit |
screen--inky_impression_13_3 |
Inky Impression 13.3 | md | 1-bit |
screen--inky_impression_7_3 |
Inky Impression 7.3 | md | 1-bit |
screen--kobo_aura_h2o_2 |
Kobo Aura H2O Edition 2 | lg | 4-bit |
screen--kobo_aura_hd |
Kobo Aura HD | md | 4-bit |
screen--kobo_aura_one |
Kobo Aura One | lg | 4-bit |
screen--kobo_forma |
Kobo Forma | lg | 4-bit |
screen--kobo_glo |
Kobo Glo | md | 4-bit |
screen--kobo_libra_2 |
Kobo Libra 2 | md | 4-bit |
screen--kobo_sage |
Kobo Sage | lg | 4-bit |
screen--kobo_touch |
Kobo Touch | md | 4-bit |
screen--m5_paper_s3 |
M5PaperS3 | md | 4-bit |
screen--nook_simple_touch |
Nook Simple Touch | md | 4-bit |
screen--og |
TRMNL OG (B/W/R/Y), Waveshare 7.5" B/W, Waveshare 7.5" B/W/R, Waveshare 7.5" B/W/R/Y | md | 1-bit |
screen--ogv2 |
Seeed E1001 Monochrome, Seeed E1002, TRMNL OG (2-bit), Waveshare 4.26" (2-bit), Xteink X4 | md | 2-bit |
screen--onyx_boox_go_7 |
Onyx BOOX Go 7 | lg | 4-bit |
screen--onyx_boox_poke_5 |
Onyx BOOX Poke 5 | md | 4-bit |
screen--palma |
Onyx BOOX Palma | md | 4-bit |
screen--remarkable_paper_2 |
reMarkable 2 | lg | 4-bit |
screen--seeed_e1003 |
Seeed E1003 (4-bit) | lg | 4-bit |
screen--seeed_e1004 |
Seeed E1004 | lg | 1-bit |
screen--v2 |
TRMNL X | lg | 4-bit |
screen--waveshare_5_8_bw |
Waveshare 5.83" (Steam Machine) | md | 2-bit |
Where profiles come from
The TRMNL Platform exports its device registry, and the framework ships that map as generated SCSS. A released build therefore carries a class for every device the platform knows, and the framework cannot invent one of its own.
Bring your own panel in one of two ways. Apply
screen--byod_custom, the generic profile every
build ships, or compile the framework with your exact values in
$custom-devices.
Custom Devices Custom Devices Device profiles and the $custom-devices configuration for custom builds Device profiles drive the compile: each entry in the device map becomes a screen--{name} class with its dimensions, density, and color depth baked in. Configure $custom-devices to add your own profiles without touching framework source. has the profile schema, the compile-time validation, and what a configured profile generates.
Related APIs
Custom device profiles
Each entry in the device map compiles into a
screen--{name} class with its dimensions, density,
and color depth baked in. Configure $custom-devices
to produce the same classes for your own panels without touching framework source. See
Custom Devices
Custom Devices
Device profiles and the $custom-devices configuration for custom builds
Device profiles drive the compile: each entry in the device map becomes a screen--{name} class with its dimensions, density, and color depth baked in. Configure $custom-devices to add your own profiles without touching framework source.
for the profile schema.