---
title: unit
framework: corehid
role: symbol
role_heading: Instance Property
path: corehid/hidelement/unit
---

# unit

The HID specification compliant unit code for this element.

## Declaration

```swift
var unit: UInt32?
```

## Discussion

Discussion The unit code specifies the physical units for the physical value, such as Seconds or Amperes. See the HID specification for more details: https://www.usb.org/hid.
