# nextDetent

The detent one step up or down from `current`, clamped at the ends.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { nextDetent } from "@mapcairn/core";
 
function nextDetent(current: SheetDetent, direction: "up" | "down"): SheetDetent;
```

## Parameters

- `current` (`SheetDetent`)
- `direction` (`"up" | "down"`)

## Returns

`SheetDetent`

## See also

- [`SheetDetent`](https://docs.mapcairn.com/api/core/SheetDetent.md)

Source: [packages/core/src/sheet/sheet.ts:122](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/sheet/sheet.ts#L122)
