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

# bytes

The data as an array of bytes.

## Declaration

```swift
var bytes: Data
```

## Mentioned in

Communicating with human interface devices

## Discussion

Discussion The size of the data must be the elements reportSize, rounded up to the next byte.

## See Also

### Get element data and values

- [integerValue(asTypeTruncatingIfNeeded:)](corehid/hidelement/value/integervalue(astypetruncatingifneeded:).md)
- [logicalValue(asTypeTruncatingIfNeeded:)](corehid/hidelement/value/logicalvalue(astypetruncatingifneeded:).md)
- [physicalValue(fromTypeTruncatingIfNeeded:as:)](corehid/hidelement/value/physicalvalue(fromtypetruncatingifneeded:as:).md)
- [timestamp](corehid/hidelement/value/timestamp.md)
