Unsupported isn't drawn; unavailable is disabled with its reason.
Every shadcn style · one file
v2.0 · Updated Oct 13pnpm dlx shadcn@latest add https://notchset.dev/r/capability.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/capability.jsonFree, no account or key. One command for every shadcn style. With the @notchset registry added, @notchset/<name> works too.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { Ellipsis, Mail, Phone, StickyNote } from "lucide-react";
import { Button } from "@/components/ui/notchset/button";
import { Capable, CapabilitiesProvider } from "@/components/ui/notchset/capability";
import { IconButton } from "@/components/ui/notchset/icon-button";
import { Switch } from "@/components/ui/notchset/switch";
/* one record's actions under two backends: one without email (Email isn't drawn), one with email while offline */
function Actions({ title, note }: { title: string; note: string }) {
return (
<section className="flex min-w-0 flex-col gap-2.5 rounded-[var(--ns-radius-lg)] bg-[var(--ns-panel)] p-3.5 shadow-[0_0_0_1px_var(--ns-line)]">
<span className="font-[family-name:var(--ns-font-mono)] text-[length:var(--ns-text-meta)] text-[var(--ns-ink-3)] uppercase">{title}</span>
<span className="text-[length:var(--ns-text-small)] text-[var(--ns-ink-3)]">{note}</span>
<div className="flex flex-wrap items-center gap-2">
<Capable cap="email">
<Button>
<Mail />
Email
</Button>
</Capable>
<Button>
<Phone />
Log call
</Button>
<Button>
<StickyNote />
Add note
</Button>
<IconButton label="More">
<Ellipsis />
</IconButton>
</div>
</section>
);
}
export default function CapabilityDemo() {
const [offline, setOffline] = React.useState(true);
return (
<div className="grid w-full max-w-[640px] gap-3 min-[640px]:grid-cols-2">
<CapabilitiesProvider capabilities={{ email: false }}>
<Actions title="No email in this backend" note="Email isn't drawn: nothing to press, nothing to explain." />
</CapabilitiesProvider>
<CapabilitiesProvider capabilities={{ email: true }} unavailable={{ email: offline ? "You're offline. Email sends once you're back." : null }}>
<Actions title="Email, offline now" note="Disabled with its reason on hover, focus or tap. It comes back by itself." />
</CapabilitiesProvider>
<Switch checked={offline} onCheckedChange={(on) => setOffline(on)}>
Offline
</Switch>
</div>
);
}This example also uses Button, Icon button, Switch, lucide-react. This command installs them with it, so the example pastes as it is:
pnpm dlx shadcn@latest add https://notchset.dev/r/capability.json https://notchset.dev/r/button.json https://notchset.dev/r/icon-button.json https://notchset.dev/r/switch.jsoncomponents/ui/notchset/capability.tsx
cap–
stringThe capability the control needs ("email").
capabilities–
CapabilitiesOverrides the provider's declaration.
unavailable–
UnavailabilityOverrides the provider's reasons.
side"top"
"top" | "bottom"Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v2.0.0 · 2026-10-13
Released with the Notchset system.
The same file, at work in a finished app. Open it live and find it on its pages.