---
title: "speed(_:unit:metric:)"
framework: workoutkit
role: symbol
role_heading: Type Method
path: "workoutkit/workoutalert/speed(_:unit:metric:)-4zald"
---

# speed(_:unit:metric:)

Creates a new speed threshold alert.

## Declaration

```swift
static func speed(_ value: Double, unit: UnitSpeed, metric: WorkoutAlertMetric = .current) -> Self
```

## Parameters

- `value`: The threshold value.
- `unit`: The speed units used by the threshold value.
- `metric`: The metric used to measure the speed.

## See Also

### Creating speed alerts

- [speed(_:unit:metric:)](workoutkit/workoutalert/speed(_:unit:metric:)-1o2j.md)
- [SpeedRangeAlert](workoutkit/speedrangealert.md)
- [SpeedThresholdAlert](workoutkit/speedthresholdalert.md)
