Collapsible
Shadcn Collapsible: Root, Trigger, Content and inherited Base disclosure semantics.
Shadcn Collapsible contains three real Proto UI prototypes: Root, Trigger and Content. Each consumes its matching Base Collapsible hook. Root remains the sole expansion owner; this family changes presentation only. This is a draft, independently maintained design projection.
Try the protocol
Section titled “Try the protocol”The demo uses the library prototypes in all four Web adapters. The first disclosure starts closed and detaches its content view. The second starts open and retains a hidden view after closing. The third is disabled while open. The fourth stays closed after a request until you activate Accept. That acceptance button is a separate application action, never a second interaction owner inside Trigger.
Three parts, one state owner
Section titled “Three parts, one state owner”- Root:
open?,defaultOpen?,disabled?; exposesopen, request methodsopenCollapsible,close,toggle, andopenChangewith{ open, reason }. - Trigger:
disabled?; inherits expanded, effective disabled, hover, press, focused and focus-visible states, button accessibility, natural Tab order, Enter/Space activation and guardedfocusSelf. - Content:
keepMounted?; inherits derivedopen/hidden, role-neutral content and L1 view presence. Closing does not dispose the logical instance. Detached native child/view state is not promised.
Supply exactly one Trigger and one Content in the Root’s own anatomy domain. Nested and adjacent disclosures retain independent ownership. Controlled requests never change canonical expansion until the owner supplies a new open; ignored requests stay ignored. Disabled suppresses requests without closing already open content. There is no heading prerequisite, Accordion selection, arrow-key navigation, region landmark, automatic focus movement or Overlay.
Presentation and small screens
Section titled “Presentation and small screens”The primitives use bounded width, shrinkable layout, wrapping long words, scalable padding and no fixed content height. Focus and disabled appearance consume Base states. Keep enough surrounding room for the focus ring and, in Neobrutalist, its hard shadow and translated pointer envelope. The demo includes a long label and unbroken content word; browser acceptance checks 320px width, 200% root text size and both light and dark themes. Source/simulated-DOM passes do not establish these paint or native-input results.
The pinned reference exports unstyled Collapsible primitives. The safe spacing and control/content surfaces here are deliberate Proto UI design-language defaults, not a claim that the reference contains those styles. Base replaces the reference runtime; no reference React primitive is an implementation dependency.
Consume
Section titled “Consume”The current source provides the shadcn-collapsible CLI facade for react, vue, vue2 and wc. New source entries are not claims about an already published package version.
import { collapsibleRoot, collapsibleTrigger, collapsibleContent,} from '@proto.ui/prototypes-shadcn/collapsible';Keep the same three-part composition when adapting the exported prototypes. The Base protocol describes the shared request and lifecycle guarantees.
Evidence and references
Section titled “Evidence and references”Four-adapter synthetic-DOM and compiler mappings are separate from registered browser journeys, screenshots, native GPUI execution and independent stable admission. Unexecuted host evidence remains an acceptance gap.