# Points and dp

> A point (pt) is the unit of layout on iOS and a dp is the unit on Android; both are virtual pixels that the system scales to the screen’s density. A Figma frame of 402 by 874 is in points, not in device pixels.

Page: https://www.appetiteui.com/glossary/points-and-dp. Points vs dp: pt on iOS, dp on Android. Also called pt vs dp, Density-independent pixels, Logical pixels.

## Why it matters

Figma frames, specs and code all use these units, so mixing them with device pixels breaks every size. A 44-pixel button on a 3x screen is a third of the size that was meant.

On Android, one dp equals one pixel on a 160 dpi screen and is scaled for every other density.

## iOS and Android

|  | iOS | Android (Material 3) | Appetite UI |
| --- | --- | --- | --- |
| Name | Point | Density-independent pixel (dp) | Frame units, no suffix |
| Baseline density | 1x, scaled 2x or 3x | 160 dpi | See below |
| Minimum touch target | 44 pt | 48 dp | `platform/min-touch-target` |

## In Appetite UI

Appetite UI frames are drawn in points and dp at 1x, and the Platform collection switches the numbers that differ: the touch target is 44 on iOS and 48 on Android. Dimension tokens run on a 4 pt scale.

## Example

A button 44 high is 44 pt on iOS and 44 dp on Android in the design; the device draws it at 132 pixels on a 3x iPhone. The Android minimum target is 48 dp, so the Android frame sets the mode.

## Common mistakes

- Exporting at device pixel size and calling it the design size.
- Using px in specs for Android. Hand over dp, and sp for text.
- Designing at one iPhone size. Check the frame against the sizes in the screen sizes article.
- Treating 44 and 48 as the same target.

## Questions

### Is a point the same as a dp?

In a design file, one pt and one dp are the same 1x unit, but they scale by different rules: iOS by 2x or 3x, Android by its density. The minimum touch targets differ: 44 pt and 48 dp.

### What size is an iPhone frame in Figma?

In points, not pixels. The blog article on iPhone screen sizes lists the frames Appetite UI uses, such as 402 by 874 for iPhone 18 Pro.

## Sources

1. [Apple Human Interface Guidelines: Layout](https://developer.apple.com/design/human-interface-guidelines/layout)
2. [Android Developers: Support different pixel densities](https://developer.android.com/training/multiscreen/screendensities)

## Related

- Docs: [Dimensions](https://www.appetiteui.com/docs/dimensions)
- Docs: [Platform Bridge](https://www.appetiteui.com/docs/platform-bridge)
- Article: [iPhone screen sizes in Figma: 402 × 874 for iPhone 18 Pro, 440 × 956 for Pro Max](https://www.appetiteui.com/blog/iphone-screen-sizes-figma)
- Article: [Android screen sizes in Figma: design by window size class, not by device](https://www.appetiteui.com/blog/android-screen-sizes-figma)
- Glossary: [Touch target](https://www.appetiteui.com/glossary/touch-target)
- Glossary: [Spacing scale](https://www.appetiteui.com/glossary/spacing-scale)
- Glossary: [Size classes](https://www.appetiteui.com/glossary/size-classes)
