BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ns-ui/consent-scope-redact
This component no longer exists. It was in ns-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-07 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Consent Scope Redact

ns-ui/consent-scope-redact
RemovedComponent

A consent surface that shows instead of tells: a live sentence templated from the user's own record, where each sharing scope is a real switch and toggling it sweeps a felt-pen redaction bar over exactly the tokens that scope withholds.

Live preview

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

Install it

npx shadcn@latest add https://design.helpmarq.com/r/consent-scope-redact.json

Source

registry/core/consent-scope-redact/component.tsxdesign.helpmarq.com/r/consent-scope-redact.json · first 6 KB
1"use client";
2
3import { useId, useState } from "react";
4
5/** One sharing scope, rendered as a real switch. Toggling it redacts/reveals every token tagged with its `id`. */
6export interface LampBlackScope {
7 id: string;
8 /** Visible + accessible label for the switch, e.g. "Location". */
9 label: string;
10 /** Optional one-line clarifier under the label. */
11 hint?: string;
12 /** Whether this scope is shared (visible) at mount. Defaults to true. */
13 defaultShared?: boolean;
14}
15
16/** A redactable span of the record — literal text tied to a scope. */
17export interface LampBlackToken {
18 /** Literal text of this token exactly as it appears in the record. */
19 text: string;
20 /** Which scope's switch controls this token. Must match a `LampBlackScope.id`. */
21 scope: string;
22 /** Short noun used in the a11y string "[withheld: kind]" — defaults to `scope`. */
23 kind?: string;
24}
25
26/** A part of the templated sentence: plain connective text, or a token tied to a scope. */
27export type LampBlackPart = string | LampBlackToken;
28
29export interface LampBlackProps {
30 /** The switches — one per sharing scope. */
31 scopes: LampBlackScope[];
32 /** The sentence, templated as an ordered list of literal text and scope-tagged tokens. */
33 record: LampBlackPart[];
34 className?: string;
35}
36
37const SWEEP_MS = 260;
38const STAGGER_MS = 40;
39
40function isToken(part: LampBlackPart): part is LampBlackToken {
41 return typeof part !== "string";
42}
43
44// Deterministic +/-0.3deg per bar so the strokes don't all sit dead-level — a
45// hand-laid feel, not randomness that would differ mount to mount.
46function rotationFor(text: string, groupIndex: number): number {
47 const sign = (text.length + groupIndex) % 2 === 0 ? 1 : -1;
48 return sign * 0.3;
49}
50
51/**
52 * A consent surface that shows instead of tells: a live sentence built from
53 * the user's own record, where each sharing scope is a real switch and
54 * toggling one sweeps a felt-pen redaction bar over exactly the tokens that
55 * scope withholds. The bar is the consent document.
56 */
57export function LampBlack({ scopes, record, className = "" }: LampBlackProps) {
58 const [shared, setShared] = useState<Record<string, boolean>>(() =>
59 Object.fromEntries(scopes.map((s) => [s.id, s.defaultShared ?? true])),
60 );
61 const uid = useId();
62
63 const toggle = (id: string) => {
64 setShared((prev) => ({ ...prev, [id]: !prev[id] }));
65 };
66
67 // per-scope running counts, for the 40ms group stagger
68 const groupCounts: Record<string, number> = {};
69
70// … truncated

Files it writes

  • registry/core/consent-scope-redact/component.tsx

Facts

Registry
ns-ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-02
Last confirmed
12 days ago

Go to the source

Docs on ns-ui design.helpmarq.com nikolas-sapa/ns-ui on GitHub Raw registry item This item as JSON

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

ToolDrift

What the AI coding tools changed last night

tooldrift.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 ToolDrift

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 ToolDrift

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 ToolDrift

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