<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Padding/PaddingConstructor2",
  "metadataVersion" : "0.1.0",
  "role" : "Constructor",
  "symbol" : {
    "kind" : "Constructor",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instctr/mapkit.Padding/PaddingConstructor2"
  },
  "title" : "new Padding(top)"
}
-->

# new Padding(top)

Creates a padding object and initializes its top inset margin with the provided value.

```
constructor(top: number);
```

## Parameters

`top`

The top inset margin.

## Discussion

The framework sets the other padding values to `0`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)