---
title: "StyleMetrics"
description: "Property reference for the StyleMetrics global."
---
import SlintProperty from '@slint/common-files/src/components/SlintProperty.astro';
import Link from '@slint/common-files/src/components/Link.astro';

Use `StyleMetrics` to create custom widgets that match the layout settings of
the selected style e.g. fluent, cupertino, material, or qt.

See [Widget Styles](/master/docs/slint/reference/std-widgets/style.md) for details on the available styles.

## Properties

### layout-spacing
<SlintProperty propName="layout-spacing" typeName="length" propertyVisibility="out">
Defines the default layout spacing. This spacing is also used by `VerticalBox`, `HorizontalBox` and `GridBox`.
</SlintProperty>

### layout-padding
<SlintProperty propName="layout-padding" typeName="length" propertyVisibility="out">
Defines the default layout padding. This padding is also used by `VerticalBox`, `HorizontalBox` and `GridBox`.
</SlintProperty>