### Mashup Layout Example (Platform-Provided) Source: https://trmnl.com/framework/docs/3.1/mashup This example shows the structure when the platform provides the Mashup container automatically. It includes comments indicating platform-provided elements. ```html
...
...
``` -------------------------------- ### Mashup Layout Example (User-Provided) Source: https://trmnl.com/framework/docs/3.1/mashup This example demonstrates how a user can provide their own Mashup container with a specific layout class. ```html
...
...
...
...
``` -------------------------------- ### Single View Layout Example Source: https://trmnl.com/framework/docs/3.1/structure.md Demonstrates the structure for a single plugin occupying the full screen, including the screen, view, and layout. ```html
...
``` -------------------------------- ### Responsive Width Example Source: https://trmnl.com/framework/docs/3.1/size Apply different width values at different screen sizes. Styles apply to the target breakpoint and larger. ```html
Responsive Width
``` -------------------------------- ### Responsive Title Example Source: https://trmnl.com/framework/docs/3.1/title.md Shows how to make a Title responsive, changing size based on screen width. This example is small by default and becomes xlarge on large screens. ```html Responsive Title ``` -------------------------------- ### Responsive Height Example Source: https://trmnl.com/framework/docs/3.1/size Apply different height values at different screen sizes. Styles apply to the target breakpoint and larger. ```html
Responsive Height
``` -------------------------------- ### Responsive Text Size Example Source: https://trmnl.com/framework/docs/3.1/text_size Applies text size utilities with responsive prefixes. Use at the medium breakpoint and up. ```html Responsive text sizing ``` -------------------------------- ### Responsive Min/Max Width Example Source: https://trmnl.com/framework/docs/3.1/size Apply responsive minimum width values. Styles apply to the target breakpoint and larger. ```html
Responsive Min Width
``` -------------------------------- ### Responsive Grid Column Setup Source: https://trmnl.com/framework/docs/3.1/responsive Configure grid columns and spans based on screen size and orientation. ```html md:grid--cols-3, md:portrait:col--span-2 ``` -------------------------------- ### Plugin View Markup Example Source: https://trmnl.com/framework/docs/3.1/structure.md This is an example of the expected div structure for a plugin's view markup, including layout and title bar. ```html
...
...
``` -------------------------------- ### Responsive Gap Patterns Source: https://trmnl.com/framework/docs/3.1/gap Demonstrates different responsive gap patterns using flexbox and grid layouts. The first example stacks items vertically and adjusts gap size based on screen size and orientation. The second example uses a two-column grid with varying gap sizes across breakpoints and orientations. ```html
...
``` ```html
...
``` -------------------------------- ### Bit-depth Text Size Example Source: https://trmnl.com/framework/docs/3.1/text_size Applies text size utilities with bit-depth prefixes. Use on 4-bit displays only. ```html Larger on 4-bit displays ``` -------------------------------- ### Basic Column Layout Example Source: https://trmnl.com/framework/docs/3.1/columns.md Demonstrates the basic structure for creating a column layout with content. This is useful for organizing same-type data into distinct columns. ```html
...
...
``` ```html
...
...
...
``` ```html
Content for column 1
Content for column 2
Content for column 3
``` -------------------------------- ### XSmall Table Example Source: https://trmnl.com/framework/docs/3.1/table Demonstrates the usage of the 'table--xsmall' class for creating compact table rows. This is useful when space is limited and a denser table display is required. ```html
Employee Role Pranks Sales Score Fun Fact
Row 1, Cell 1 Row 1, Cell 2 Row 1, Cell 3
``` -------------------------------- ### Responsive Display Control Examples Source: https://trmnl.com/framework/docs/3.1/visibility.md Demonstrates how to use responsive prefixes like 'hidden', 'flex', 'grid', and 'inline-block' to control element display at different screen sizes. These utilities are mobile-first. ```html
Block by default, flex on medium+
``` ```html
Changes display type at each breakpoint
``` ```html ``` ```html
Cell A
Cell B
``` -------------------------------- ### Responsive Container Query Width Example Source: https://trmnl.com/framework/docs/3.1/size Apply responsive width using container query units. Styles apply to the target breakpoint and larger. ```html
Responsive Container Query
``` -------------------------------- ### Mashup (Multiple Views) Structure Example Source: https://trmnl.com/framework/docs/3.1/structure.md Shows the structure for multiple plugins on one screen, wrapping views in a Mashup with specific view size modifiers. ```html
...
...
``` -------------------------------- ### Canonical Screen Structure Example Source: https://trmnl.com/framework/docs/3.1/structure.md Illustrates the canonical div hierarchy for a screen, including the screen, view, layout, and optional title bar. ```html
...
...
``` -------------------------------- ### Simple Item Example Source: https://trmnl.com/framework/docs/3.1/item This snippet shows a basic Item component without any icons. It's suitable for displaying titles, descriptions, and associated labels. ```html
Team Meeting Weekly team sync-up
9:00 AM - 10:00 AM Confirmed
``` -------------------------------- ### Indexed Table Example Source: https://trmnl.com/framework/docs/3.1/table Demonstrates how to create an indexed table by adding a meta block with an index to cells. The 'table--indexed' class docks the meta block and adds padding. ```html
Employee Role Pranks Sales Score Fun Fact
1 Pam Beesly Receptionist 3 $0 0.00 Loves drawing
``` -------------------------------- ### Responsive Overflow Columns Example Source: https://trmnl.com/framework/docs/3.1/trmnl_x_guide.md Configure the number of columns generated by the Overflow engine based on screen size and orientation using data attributes. The most specific attribute wins. ```html
...
...
``` -------------------------------- ### Basic Portrait Orientation Variant Source: https://trmnl.com/framework/docs/3.1/responsive Use the `portrait:` prefix to apply styles only when the screen is in portrait orientation. This example arranges items in a row by default (landscape) and switches to a column layout in portrait. ```html
Item 1
Item 2
Item 3
``` -------------------------------- ### Responsive Rich Text Size Source: https://trmnl.com/framework/docs/3.1/rich_text Shows how to apply responsive prefixes to Rich Text size variants. This example displays base size by default and switches to xxxlarge on large screens. ```html

Base by default, xxxlarge on large screens

``` -------------------------------- ### Smart Columns Configuration Source: https://trmnl.com/framework/docs/3.1/overflow This example demonstrates how to use Overflow with smart columns. It requires placing Item elements inside a Column, which is nested within a Columns container, and setting column count attributes. ```html
...
``` -------------------------------- ### Responsive Clamp Example Source: https://trmnl.com/framework/docs/3.1/trmnl_x_guide.md Control the number of lines displayed for text elements using data attributes, with support for different breakpoints including large and portrait orientations. This prevents text overflow. ```html Long label text... ``` -------------------------------- ### Apply Different Sizes at Different Screen Widths Source: https://trmnl.com/framework/docs/3.1/description Use breakpoint prefixes like `sm:`, `md:`, `lg:` to apply different sizes at different screen widths. This example shows a description that is large by default and resets to base size on medium screens and up. ```html Responsive Description Base by default, xlarge on lg screens Large by default, base on medium+ screens Progressive Description Sizing ``` -------------------------------- ### Basis and Order Controls Source: https://trmnl.com/framework/docs/3.1/flex.md Demonstrates setting the initial size of flex items with `basis--XX` utilities and controlling their visual order with `order--first`, `order--last`, and `order--X`. ```html
basis--36
basis--20
basis--24
``` ```html
order--last
order--first
order--2
order---1
``` -------------------------------- ### Label with Text Clamping (2-line) Source: https://trmnl.com/framework/docs/3.1/label This example demonstrates clamping a label to exactly two lines, with an ellipsis appended to indicate that the text has been truncated. ```html This text will be clamped to exactly two lines with ellipsis ``` -------------------------------- ### Peta Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--peta` class for the largest text. The `value--tnums` modifier enables tabular numbers. ```html 42 ``` -------------------------------- ### Tera Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--tera` class for colossal text. The `value--tnums` modifier enables tabular numbers. ```html 42 ``` -------------------------------- ### Grow, Shrink, and Flex Shorthand Source: https://trmnl.com/framework/docs/3.1/flex.md Illustrates item-level controls for growing (`grow`), preventing shrinking (`shrink-0`), and applying flex shorthand properties (`flex-none`, `flex-initial`). ```html
grow
shrink-0
flex-none
flex-initial
``` -------------------------------- ### Giga Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--giga` class for massive text. The `value--tnums` modifier enables tabular numbers. ```html 42 ``` -------------------------------- ### XXXLarge Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--xxxlarge` class for very large text. The `value--tnums` modifier enables tabular numbers. ```html Example 48,206.62 ``` -------------------------------- ### Responsive Content Sizing with Breakpoint Prefixes Source: https://trmnl.com/framework/docs/3.1/rich_text Apply different content sizes at different screen widths using breakpoint prefixes like sm:, md:, lg:. Base size is applied by default. ```html

Responsive content

``` ```html

Small by default, base on medium+ screens

``` ```html

Progressive content sizing

``` -------------------------------- ### XXLarge Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--xxlarge` class for very large text. The `value--tnums` modifier enables tabular numbers. ```html Example 48,206.62 ``` -------------------------------- ### XLarge Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--xlarge` class for larger text. The `value--tnums` modifier enables tabular numbers. ```html Example 48,206.62 ``` -------------------------------- ### Large Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--large` class for larger text. The `value--tnums` modifier enables tabular numbers. ```html Example 48,206.62 ``` -------------------------------- ### Bit-Depth Display Control Examples Source: https://trmnl.com/framework/docs/3.1/visibility.md Illustrates using bit-depth prefixes such as '1bit:hidden', '2bit:flex', and '4bit:grid' to tailor layouts for displays with specific bit-depth capabilities, optimizing for monochrome or grayscale screens. ```html
Hide on monochrome displays
Display as flex on 4-shade grayscale displays
Display as grid on 16-shade grayscale displays
``` -------------------------------- ### Responsive Gap with Size and Orientation Source: https://trmnl.com/framework/docs/3.1/gap Apply different gap sizes based on screen size and orientation. This example sets small gaps by default, large gaps on medium screens and up, extra-large gaps on large screens and up, medium gaps in portrait mode, and extra-large gaps on medium screens and up in portrait mode. ```html
...
...
...
``` -------------------------------- ### Apply Chromatic Backgrounds and Text Source: https://trmnl.com/framework/docs/3.1/background Use `bg--{hue}-{step}` for color backgrounds and `text--{hue}-{step}` for color text. Examples include red, blue, and green hues with specific shade steps. ```html
Pure red
Red 50
Blue 40
Green 60
Red text
``` -------------------------------- ### Responsive Visibility: Medium Screens and Up Source: https://trmnl.com/framework/docs/3.1/visibility.md Use 'hidden md:visible' to hide an element by default and make it visible starting from medium screen sizes. ```html ``` -------------------------------- ### Responsive Content Sizing with Bit-Depth Prefixes Source: https://trmnl.com/framework/docs/3.1/rich_text Optimize content text size for different display color capabilities using bit-depth prefixes like 1bit:, 2bit:, and 4bit:. ```html

Display optimized content

``` ```html

Selective sizing

``` -------------------------------- ### Responsive Font Weight - Medium Breakpoint Source: https://trmnl.com/framework/docs/3.1/font_weight.md Applies bold font weight starting from the medium breakpoint and up, ensuring text is bold on larger screens. ```html Bold at medium breakpoint and up ``` -------------------------------- ### Mega Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--mega` class for extremely large text. The `value--tnums` modifier enables tabular numbers. ```html 42 ``` -------------------------------- ### Small Value Example Source: https://trmnl.com/framework/docs/3.1/value Use the `value--small` class for a smaller text size. The `value--tnums` modifier enables tabular numbers. ```html Example 48,206.62 ``` -------------------------------- ### Combined Size, Orientation, and Bit-Depth Variant Source: https://trmnl.com/framework/docs/3.1/responsive This example demonstrates combining size, orientation, and bit-depth variants for highly specific targeting. It arranges items in a row by default and switches to a column layout on medium screens and larger, in portrait mode, with a 4-bit display. ```html
``` -------------------------------- ### Tabular Numbers Formatting Source: https://trmnl.com/framework/docs/3.1/value Add the `value--tnums` modifier to enable tabular numbers for consistent alignment. This example shows regular and tabular numbers side-by-side. ```html Regular: 48,206.62 Tabular: 48,206.62 ``` -------------------------------- ### Left Aligned Rich Text Example Source: https://trmnl.com/framework/docs/3.1/rich_text Demonstrates left alignment for the richtext container, content block, and text. This is the default and most readable format for longer text content. ```html

This is an example of left-aligned rich text content.

Multiple paragraphs will maintain the same alignment.

``` -------------------------------- ### Apply Semantic Backgrounds and Text Source: https://trmnl.com/framework/docs/3.1/background Use `bg--{role}` for intent-based backgrounds and `text--{role}` for intent-based text. Supported roles include primary, success, error, and warning. ```html
Primary
Success
Error
Warning text
``` -------------------------------- ### Responsive Text Color with Orientation Prefixes Source: https://trmnl.com/framework/docs/3.1/text_color Text colors can adapt to orientation using `portrait:` and `landscape:` prefixes. This example shows black text in portrait mode. ```html Orientation color variant Color on md+ portrait ``` -------------------------------- ### Combined Responsive Flex Layouts Source: https://trmnl.com/framework/docs/3.1/flex.md Demonstrates combining orientation-responsive variants with size breakpoints for complex adaptive layouts. ```html
``` -------------------------------- ### Label with Text Clamping (1-line) Source: https://trmnl.com/framework/docs/3.1/label Use the `data-clamp` attribute to limit labels to a specific number of lines. This example shows clamping to a single line with ellipsis overflow. ```html This text will be clamped to one line ``` -------------------------------- ### Orientation-Responsive Flex Direction Source: https://trmnl.com/framework/docs/3.1/flex.md Use the 'portrait:' prefix to change flex direction or alignment based on screen orientation. This example shows a row in landscape and a column in portrait. ```html
Nav Item 1
Nav Item 2
Nav Item 3
``` -------------------------------- ### Responsive Clamp with Screen Size and Orientation Modifiers Source: https://trmnl.com/framework/docs/3.1/clamp Apply different clamping rules based on screen size and orientation using `data-clamp-` modifiers. This example clamps to 2 lines by default, 4 on medium+ screens, and 1 in portrait mode. ```html Clamp to 2 lines by default, 4 on medium+ screens, 1 in portrait ``` -------------------------------- ### Responsive Gap Utilities Source: https://trmnl.com/framework/docs/3.1/responsive Apply different gap sizes for various screen sizes. ```html md:gap--large, lg:gap--xlarge ``` -------------------------------- ### Apply Grayscale Backgrounds Source: https://trmnl.com/framework/docs/3.1/background Use `bg--{shade}` utility classes to apply grayscale background patterns. Examples include black, gray-10 through gray-75, and white. ```html
Black
Gray 10
Gray 15
Gray 20
Gray 25
Gray 30
Gray 35
Gray 40
Gray 45
Gray 50
Gray 55
Gray 60
Gray 65
Gray 70
Gray 75
White
```