Components / PaperSlider

Forms

PaperSlider

Square-leaning slider control for value tuning.

↗ direct manipulation, paper-style.

Preview

'use client'

import * as React from 'react'
import { cn } from '@/lib/utils'

export interface PaperSliderProps extends React.InputHTMLAttributes<HTMLInputElement> {

Installation

Copy this file into your project, export its barrel, and then add it to the master UI index.

  1. Step 1.Create this file:
    components/ui/paperSlider/paperSlider.tsx
  2. Step 2.Create the barrel:
    components/ui/paperSlider/index.ts
  3. Step 3.Add this export in components/ui/index.ts:
    export * from './paperSlider'

Variants

Default

Labeled

Props

PropTypeDefaultDescription
labelstringundefinedOptional mono label above control.
min / maxnumber0 / 100Allowed value range.
value / defaultValuenumberundefinedControlled or uncontrolled value.

Examples

Density control

Great for tuning UI spacing in playgrounds.

<PaperSlider label="Density" defaultValue={45} />

Audio level

Small footprint control for media panels.

<PaperSlider label="Gain" defaultValue={72} />