<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@jsamr/counter-style](./counter-style.md) &gt; [CounterStyleRenderer](./counter-style.counterstylerenderer.md) &gt; [withRange](./counter-style.counterstylerenderer.withrange.md)

## CounterStyleRenderer.withRange() method

Create a new renderer with a constrained range. When the index is out of bounds, the counter representation is rendered with the provided fallback, or the default fallback if none was provided.

See [CSS Counter Styles Level 3, Limiting the counter scope: the range descriptor](https://www.w3.org/TR/css-counter-styles-3/#counter-style-range)<!-- -->.

<b>Signature:</b>

```typescript
withRange(min: number, max: number, fallback?: FallbackRenderer): CounterStyleRenderer;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  min | number | Minimum value (inclusive) |
|  max | number | Maximum value (inclusive) |
|  fallback | [FallbackRenderer](./counter-style.fallbackrenderer.md) | A fallback renderer to apply when the index is out of bounds. |

<b>Returns:</b>

[CounterStyleRenderer](./counter-style.counterstylerenderer.md)

