<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreHID",
  "identifier" : "/documentation/CoreHID/HIDElement",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core HID"
    ],
    "preciseIdentifier" : "s:7CoreHID10HIDElementV"
  },
  "title" : "HIDElement"
}
-->

# HIDElement

A representation of an item from a report descriptor for a HID device.

```
struct HIDElement
```

## Overview

A [`HIDElement`](/documentation/CoreHID/HIDElement) is an abstraction for the data in a HID report, and represents one item of data that could be sent or received in a report for a specific device. For example, for a mouse with a report descriptor that declares a report with 1 byte of data for each an X and a Y coordinate, there would be an element for the data associated with the X coordinate. If this element was monitored by a [`HIDDeviceClient`](/documentation/CoreHID/HIDDeviceClient), when an input report was received with an update to the X coordinate, a notification with the updated data would be sent to [`HIDDeviceClient.Notification.elementUpdates(values:)`](/documentation/CoreHID/HIDDeviceClient/Notification/elementUpdates(values:)).

Elements are only received by requesting the elements for a specific device through a client’s [`elements`](/documentation/CoreHID/HIDDeviceClient/elements) property.

See the HID specification for more details: [](https://www.usb.org/hid).

## Topics

### Structures

[`struct Value`](/documentation/CoreHID/HIDElement/Value)

Data associated with a HID element.

### Instance Properties

[`var client: HIDDeviceClient`](/documentation/CoreHID/HIDElement/client)

The client for the device with which this element is associated.

[`var logicalMaximum: Int64?`](/documentation/CoreHID/HIDElement/logicalMaximum)

The logical maximum for this element’s data.

[`var logicalMinimum: Int64?`](/documentation/CoreHID/HIDElement/logicalMinimum)

The logical minimum for this element’s data.

[`var parentCollection: HIDElementCollection`](/documentation/CoreHID/HIDElement/parentCollection)

The [`HIDElementCollection`](/documentation/CoreHID/HIDElementCollection) that contains this element.

[`var physicalMaximum: Int64?`](/documentation/CoreHID/HIDElement/physicalMaximum)

The physical maximum for this element’s data.

[`var physicalMinimum: Int64?`](/documentation/CoreHID/HIDElement/physicalMinimum)

The physical minimum for this element’s data.

[`var reportID: HIDReportID?`](/documentation/CoreHID/HIDElement/reportID)

The report ID for the report that contains this element.

[`var reportSize: UInt32`](/documentation/CoreHID/HIDElement/reportSize)

The size in bits of the data for this element.

[`var type: HIDReportType`](/documentation/CoreHID/HIDElement/type)

The type of this element.

[`var unit: UInt32?`](/documentation/CoreHID/HIDElement/unit)

The HID specification compliant unit code for this element.

[`var unitExponent: Int8?`](/documentation/CoreHID/HIDElement/unitExponent)

The calculated exponent for this element.

[`var usage: HIDUsage`](/documentation/CoreHID/HIDElement/usage)

The HID specification compliant usage for this element.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Escapable`](/documentation/Swift/Escapable)

---

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)