---
title: maximumRecents
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nssearchfield/maximumrecents
---

# maximumRecents

The maximum number of search strings that can appear in the search menu.

## Declaration

```swift
var maximumRecents: Int { get set }
```

## Discussion

Discussion The value of this property must be between 0 and 254. Specifying a negative value for the property sets it to the default value, which is 10. Specifying a value greater than 254 sets the property to 254. When the maximum number of search strings is exceeded, the oldest search string on the menu is dropped.

## See Also

### Managing Recent Searches

- [recentSearches](appkit/nssearchfield/recentsearches.md)
- [recentsAutosaveName](appkit/nssearchfield/recentsautosavename-swift.property.md)
- [NSSearchField.RecentsAutosaveName](appkit/nssearchfield/recentsautosavename-swift.typealias.md)
