Metrics
Pre-alphaThe registry and the CLI are not published yet.Roadmap

Metrics

Touch target, screen margin and hairline.

Draft

The values shown here are conceptual and may change.

Metrics are layout constants that apply across the whole app rather than to one element.

touchTarget 44
screenMargin 16
hairline 1px
Conceptual
export const metrics = {
	touchTarget: 44,
	screenMargin: 16,
	hairline: StyleSheet.hairlineWidth,
} satisfies Metrics;
KeyDefaultUse
touchTarget44ptMinimum touch area of anything pressable
screenMargin16ptHorizontal padding between content and the screen edges
hairline1 physical pixelSeparators and thin borders

Usage

Tappable reads touchTarget and adds hitSlop when an element is smaller, so a 24pt icon button still gets a 44pt touch area.

Conceptual
<ScrollView
	contentContainerStyle={{ paddingHorizontal: tokens.metrics.screenMargin }}
/>

On this page