# Visibility
Show or hide an element and set its display type. Hidden and visible controls plus display helpers like flex, grid, and inline, each with responsive and bit-depth variants for device-specific layouts.
## Visibility Across Devices
Every device carries a size class: `sm`, `md`, or `lg`. Each column below targets one of them, so switching the device in the screen picker changes which column has content.
Small (sm)
visible md:hidden
Medium (md)
hidden md:visible lg:hidden
Large (lg)
hidden lg:visible
```
visible
hidden
md:visible
md:hidden
lg:hidden
md:flex
lg:grid
```
## Display Utilities
Control how elements are displayed with specific display types. These classes set the CSS `display` property.
| Class | Effect | CSS Output |
| --- | --- | --- |
| `hidden` | Hide element completely | `display: none` |
| `visible` | Display as block element | `display: block` |
| `block` | Display as block element | `display: block` |
| `inline` | Display as inline element | `display: inline` |
| `inline-block` | Display as inline block element | `display: inline-block` |
| `flex` | Display as flex container | `display: flex` |
| `grid` | Display as grid container | `display: grid` |
| `inline-grid` | Display as inline grid container | `display: inline-grid` |
| `table` | Display as table element | `display: table` |
| `table-row` | Display as table row element | `display: table-row` |
| `table-cell` | Display as table cell element | `display: table-cell` |
## Responsive Display Control
All display utilities take the size prefixes. They are mobile-first, so a prefix applies on its own size class and every larger one. See [Responsive](/framework/docs/3.4/responsive) for the size class each device carries.
| Example Class | Effect | Active On |
| --- | --- | --- |
| `sm:hidden` | Hide on small screens and larger | sm, md, lg (every device) |
| `md:flex` | Display as flex on medium screens and larger | md, lg |
| `lg:grid` | Display as grid on large screens | lg |
| `sm:inline-block` | Display as inline-block on small screens and larger | sm, md, lg (every device) |
```
Show as block on medium+
Block by default, flex on medium+
Show as inline-grid on large screens
Changes display type at each breakpoint
Different layout per screen size
```
## Bit-Depth Display Control
All display utilities take the bit-depth prefixes. These are not progressive the way the size prefixes are: `2bit:` applies on 2-bit screens and nowhere else.
| Example Class | Effect | Active On |
| --- | --- | --- |
| `1bit:hidden` | Hide on monochrome displays | Every 1-bit profile (TRMNL OG, Playdate, Frame, and the color panels that dither to black and white) |
| `2bit:flex` | Display as flex on 4-shade grayscale displays | Every 2-bit profile (TRMNL OG V2, Waveshare 5.8" B/W) |
| `4bit:grid` | Display as grid on 16-shade grayscale displays | Every 4-bit profile (TRMNL V2, Kindle 2024, reMarkable Paper 2, and most Kobo and Inkplate panels) |
## Device-Specific Display Control
Combine a size and a bit-depth prefix on any display utility to narrow the target to one group of panels. Use the pattern `size:bit-depth:display`.
| Example Class | Target Device | Effect |
| --- | --- | --- |
| `md:1bit:block` | 1-bit screens at md or lg (TRMNL OG, Frame) | Display as block |
| `md:2bit:flex` | 2-bit screens at md or lg (TRMNL OG V2, Waveshare 5.8" B/W) | Display as flex |
| `lg:4bit:grid` | 4-bit screens at lg (TRMNL V2, Kindle Scribe, reMarkable Paper 2, and 11 more) | Display as grid |
| `sm:4bit:table` | Every 4-bit screen, since sm is the smallest size class | Display as table |
```
Different display types per device generation
Simple layouts for lower bit-depth displays
Progressive enhancement across all device capabilities
```
## Dark Mode Display Control
Visibility utilities support dark-first prefixes for screen dark mode targeting. Use `dark:` to show or hide content by screen dark mode. Light-mode behavior is the default state.
```
Dark mode hides this
Dark mode shows this
Hidden on dark medium+ portrait 2-bit screens
```
Previous [
## Responsive Test
Test responsive utilities and compare SCSS mixins with CSS classes
](/framework/docs/3.4/responsive_test)
Next [
## Background
Apply color tokens as backgrounds with bg--{token}
](/framework/docs/3.4/background)