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

Metrics

Touch target, press scale, 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,
	pressScale: 0.97,
	screenMargin: 16,
	hairline: StyleSheet.hairlineWidth,
	stackScale: 0.915,
} satisfies Metrics;
KeyDefaultUse
touchTarget44ptMinimum touch area of anything pressable
pressScale0.97Scale a button-like element takes while it is held
screenMargin16ptHorizontal padding between content and the screen edges
hairline1 physical pixelSeparators and thin borders
stackScale0.915How much a sheet shrinks per level in a stack

Usage

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

pressScale is the value Button, IconButton and FloatingButton hand to Tappable’s pressScale prop. Lower it for a firmer press, or set it to 1 to keep the fill change as the only feedback.

stackScale is how far a BottomSheet recedes when another one opens over it, applied once per level and capped at two levels. Set it to 1 to keep the sheet underneath at full size and leave the new overlay as the only sign that something opened on top.

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

On this page