BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ridiculous/filter-builder

Filter Builder

ridiculous/filter-builder
FreeComponent

Ridiculously typed CSS filter / backdrop-filter editor — a space-separated function list with compile-time per-function arity and dimension typing, plus a drop-shadow color validated against the color-picker ColorLiteral. Ships a tolerant runtime parser and a live preview with a filter ↔ backdrop-filter toggle.

Install it

npx shadcn@latest add http://ridiculous.turtlesocks.dev/r/filter-builder.json

Source

src/components/ui/filter-builder/filter-builder.tsxridiculous.turtlesocks.dev/r/filter-builder.json · first 6 KB
1"use client"
2
3import { useEffect, useRef, useState } from "react"
4import { Button } from "@/components/ui/button"
5import {
6 Popover,
7 PopoverContent,
8 PopoverTrigger,
9} from "@/components/ui/popover"
10import { cn } from "@/lib/utils"
11import type { FilterMode } from "./filter-builder.constants"
12import {
13 defaultItem,
14 formatFilter,
15 parseFilter,
16} from "./filter-builder.helpers"
17import type {
18 FilterFunctionName,
19 FilterItem,
20 FilterString,
21} from "./filter-builder.types"
22import { FilterPreview } from "./filter-preview"
23import { FilterFunctionRow, FunctionOptions } from "./filter-row"
24
25// Re-export the extracted sub-components + their prop types so the public
26// entry surface (and existing deep imports) is unchanged by the file split.
27export type { FilterPreviewProps } from "./filter-preview"
28export { FilterPreview } from "./filter-preview"
29export type {
30 FilterArgEditorProps,
31 FilterFunctionRowProps,
32} from "./filter-row"
33export { FilterArgEditor, FilterFunctionRow } from "./filter-row"
34
35// ---------------------------------------------------------------------------
36// Shared props
37// ---------------------------------------------------------------------------
38
39export interface FilterBuilderPanelProps {
40 value: FilterString | (string & {})
41 onChange: (value: FilterString) => void
42 /**
43 * Which CSS property the live preview targets. Both `filter` and
44 * `backdrop-filter` share the identical function-list grammar, so this does
45 * not change validation or narrow the `onChange` output — it only drives the
46 * preview render target + labels. Defaults to `"filter"`.
47 */
48 mode?: FilterMode
49 className?: string
50 "aria-label"?: string
51}
52
53export interface FilterBuilderProps extends FilterBuilderPanelProps {}
54
55// ---------------------------------------------------------------------------
56// FilterBuilder — popover-wrapped
57// ---------------------------------------------------------------------------
58
59export function FilterBuilder(props: FilterBuilderProps) {
60 const {
61 value,
62 className,
63 "aria-label": ariaLabel = "Edit a CSS filter",
64 } = props
65 const items = parseFilter(String(value)) ?? []
66
67 return (
68 <Popover>
69 <PopoverTrigger asChild>
70 <Button
71 variant="outline"
72 className={cn("h-9 gap-2 px-3 font-mono", className)}
73 aria-label={ariaLabel}
74 >
75 <span aria-hidden="true" className="text-foreground/60">
76 ✦
77 </span>
78// … truncated

What it pulls in

Other registry items

  • ridiculous-type-kit
  • color-picker
  • button
  • popover
  • input
  • label
  • slider

Files it writes

  • src/components/ui/filter-builder/index.ts
  • src/components/ui/filter-builder/filter-builder.tsx
  • src/components/ui/filter-builder/filter-builder.types.ts
  • src/components/ui/filter-builder/filter-builder.helpers.ts
  • src/components/ui/filter-builder/filter-builder.constants.ts
  • src/components/ui/filter-builder/filter-preview.tsx
  • src/components/ui/filter-builder/filter-row.tsx

Facts

Registry
ridiculous
Type
registry:ui
Access
Free
Files written
7
Licence
MIT
In the index
at or before 2026-08-08
Last confirmed
yesterday

Go to the source

ridiculous.turtlesocks.dev TurtIeSocks/ridiculous on GitHub Raw registry item This item as JSON

More from ridiculous

All 22 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
All ridiculous componentsallridiculousComponentsFreeno deps
Anchor Position Editoranchor-position-editorridiculousComponentsFreeno deps · 9 files
Background Editorbackground-editorridiculousComponentsFreeno deps · 9 files
Box Shadow Editorbox-shadow-editorridiculousComponentsFreeno deps · 7 files
Calc Editorcalc-editorridiculousComponentsFreeno deps · 4 files
Clip Path Editorclip-path-editorridiculousComponentsFreeno deps · 20 files
Color Functioncolor-functionridiculousComponentsFreeno deps · 10 files
Color Pickercolor-pickerridiculousComponentsFreeno deps · 11 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