BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/nexvyn/fader

Fader

nexvyn/fader
FreeComponent

A mixing-console-style parameter fader where the control IS the display, with continuous and detent value grammars, elastic overdrag, and spring-animated settle.

Live preview

live · rendered by the registry
Rendered by nexvyn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.nexvyn.dev/r/fader.json

Source

components/ui/fader/fader.tsxui.nexvyn.dev/r/fader.json · first 6 KB
1'use client'
2
3import { Slider as BaseSlider } from '@base-ui/react/slider'
4import { type MotionValue, motion, useTransform } from 'motion/react'
5import type { Ref } from 'react'
6import { cn } from '@/lib/utils'
7import { springs } from '@/lib/motion-tokens'
8import { BAR_BOX, barCenterFor, fillEdgePx } from './geometry'
9import { type UseFaderOptions, useFader } from './use-fader'
10import { playHoverSound, playClickSound, playTickSound } from '@/lib/sound'
11
12const MARK_HIDE_RADIUS = 10
13const MARK_HIDE_FADE = 6
14
15const sizeVariants = {
16 sm: {
17 control: 'h-8',
18 overlay: 'px-3',
19 text: 'text-xs',
20 bar: 'h-4',
21 mark: 'size-1',
22 },
23 md: {
24 control: 'h-10',
25 overlay: 'px-3.5',
26 text: 'text-sm',
27 bar: 'h-5',
28 mark: 'size-1',
29 },
30 lg: {
31 control: 'h-12',
32 overlay: 'px-4',
33 text: 'text-sm',
34 bar: 'h-6',
35 mark: 'size-1.5',
36 },
37} as const
38
39const toneVariants = {
40 accent: {
41 fill: 'border border-muted-foreground/30 bg-muted-foreground/40 pointer-fine:group-hover/fader:bg-muted-foreground/50 group-data-dragging/control:bg-muted-foreground/55',
42 bar: 'bg-muted-foreground',
43 },
44 neutral: {
45 fill: 'border border-muted-foreground/25 bg-muted-foreground/35 pointer-fine:group-hover/fader:bg-muted-foreground/45 group-data-dragging/control:bg-muted-foreground/50',
46 bar: 'bg-muted-foreground/90',
47 },
48} as const
49
50function DetentMark({
51 pct,
52 fill,
53 trackWidth,
54 className,
55}: {
56 pct: number
57 fill: MotionValue<number>
58 trackWidth: MotionValue<number>
59 className: string
60}) {
61 const filledOpacity = useTransform(() => {
62 const tw = trackWidth.get()
63 if (!tw) return fill.get() >= pct ? 1 : 0
64 const covered = fillEdgePx(fill.get(), tw) - (pct / 100) * tw
65 return Math.min(1, Math.max(0, covered / 8))
66 })
67 const visibility = useTransform(() => {
68 const tw = trackWidth.get()
69 if (!tw) {
70 return Math.abs(fill.get() - pct) < 0.001 ? 0 : 1
71 }
72 const markPx = (pct / 100) * tw
73 const barCenter = barCenterFor(fillEdgePx(fill.get(), tw))
74 const distance = Math.abs(markPx - barCenter)
75 return Math.min(1, Math.max(0, (distance - MARK_HIDE_RADIUS) / MARK_HIDE_FADE))
76 })
77 return (
78 <motion.span
79 aria-hidden
80 className={cn('-translate-x-1/2 -translate-y-1/2 absolute top-1/2', className)}
81 style={{ left: `${pct}%`, opacity: visibility }}
82 >
83 <span className="absolute inset-0 round bg-foreground/25" />
84 <motion.span
85// … truncated

What it pulls in

npm packages

  • @base-ui/react
  • motion

Files it writes

  • components/ui/fader/fader.tsx
  • components/ui/fader/geometry.ts
  • components/ui/fader/use-fader.ts
  • components/ui/fader/index.ts
  • lib/sound.ts

Facts

Registry
nexvyn
Type
registry:ui
Access
Free
Files written
5
Licence
MIT
In the index
at or before 2026-08-07
Last confirmed
today

Go to the source

Docs on nexvyn ui.nexvyn.dev Nexvyn/Nexvyn-ui on GitHub Raw registry item This item as JSON

More from nexvyn

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionnexvynComponentsFree1 dep
Action Buttonaction-buttonnexvynComponentsFree3 deps · 4 files
Adaptive Actionsadaptive-actionsnexvynComponentsFree1 dep
AI Inputai-inputnexvynComponentsFree1 dep · 2 files
BadgebadgenexvynComponentsFree2 deps · 2 files
Bars Themebars-themenexvynComponentsFree1 dep · 3 files
Bounce Sidebarbounce-sidebarnexvynComponentsFree1 dep · 2 files
BreadcrumbsbreadcrumbsnexvynComponentsFree1 dep · 2 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex