Interactive demonstration of the TRMNL custom web component
Documentation for the available properties and methods of the TRMNL component.
white,
black,
mint,
gray,
wood)
true,
false,
auto
true,
false
or
auto
white,
black,
mint,
gray,
wood)
<trmnl-frame src="https://example.com/content.html"></trmnl-frame>
<trmnl-frame color="mint" dark="true">
<div class="screen">
<div class="view">
<h1>My Custom Content</h1>
</div>
</div>
</trmnl-frame>
// Get reference to the component
const terminal = document.getElementById('my-terminal');
// Set HTML content
terminal.setHTML('<div>Dynamic content</div>');
// Change source
terminal.setSrc('https://example.com/new-content.html');
// Set the dark mode to 'dark'
terminal.setDark('true');
// Set the dark mode to 'light'
terminal.setDark('false');
// Set the dark mode to 'auto'
terminal.setDark('auto');
// Set the color TRMNL to 'white'
terminal.setColor('white');
// Set the color TRMNL to 'black'
terminal.setColor('black');
// Set the color TRMNL to 'mint'
terminal.setColor('mint');
// Set the color TRMNL to 'gray'
terminal.setColor('gray');
// Set the color TRMNL to 'wood'
terminal.setColor('wood');
// Clear content
terminal.clearContent();
// Get current HTML content
const content = terminal.getHTML();
© 2025 TRMNL. All rights reserved.