Skip to content
Back to skills

Range

ASecurity

Slider components for single value or dual-handle range selection. Draggable handles with tooltip display using Framer Motion.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
developmenttypescript

Works with

  • cursor

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add reaviz/skills --skill range --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Range?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Range
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reaviz-range/badge)](https://www.skillsdirectory.com/skills/reaviz-range)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Range

Slider components for single value or dual-handle range selection. Draggable handles with tooltip display using Framer Motion.

## Import

```tsx
import { RangeSingle, RangeDouble } from 'reablocks';
```

## Common Props (RangeProps)

Both RangeSingle and RangeDouble share these base props:

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `min` | `number` | — | Minimum value |
| `max` | `number` | — | Maximum value |
| `step` | `number` | `1` | Step increment |
| `disabled` | `boolean` | — | Disable the slider |
| `valueDisplay` | `'always' \| 'hover'` | `'hover'` | When to show value tooltip |
| `valueFormat` | `(value: number) => string` | `toLocaleString` | Format displayed value |
| `style` | `CSSProperties` | — | Inline styles |
| `className` | `string` | — | Container CSS classes |
| `handleClassName` | `string` | — | Handle CSS classes |
| `theme` | `RangeTheme` | — | Per-instance theme override |

## RangeSingle

Single-handle slider. Value is a single `number`.

### Additional Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `value` | `number` | — | Current value |
| `showHighlight` | `boolean` | `false` | Show filled track from min to value |
| `onChange` | `(value: number) => void` | — | Value change handler |

```tsx
const [value, setValue] = useState(50);

<RangeSingle min={0} max={100} value={value} onChange={setValue} />
<RangeSingle min={0} max={100} value={value} onChange={setValue} showHighlight />
```

## RangeDouble

Dual-handle slider for selecting a range. Value is a `[number, number]` tuple.

### Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `value` | `[number, number]` | — | Current range [min, max] |
| `onChange` | `(value: [number, number]) => void` | — | Range change handler |

```tsx
const [range, setRange] = useState<[number, number]>([20, 80]);

<RangeDouble min={0} max={100} value={range} onChange={setRange} />
```

The two handles maintain a minimum distance of `step` between them.

## RangeTheme Interface

```typescript
interface RangeTheme {
  base: string;          // Track container (relative, w-full, h-0.5, bg)
  drag: string;          // Handle (absolute, rounded-full, positioned)
  disabled: string;      // Disabled state
  inputWrapper: {
    base: string;        // Handle inner (cursor-pointer, rounded, bg, shadow)
    disabled: string;    // Disabled handle
  };
  rangeHighlight: {
    base: string;        // Filled track segment
    disabled: string;
  };
  input: string;         // Hidden range input (offscreen)
  tooltip: string;       // Value tooltip (absolute, positioned above)
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.