Cloud|

@k2b/ui

Disclosure

Native optional-detail disclosure with controlled and uncontrolled state.

Disclosure@k2b/ui

Disclosure reveals optional detail with native details semantics and occupies only the height of its current content.

Advanced settings
These controls stay collapsed until they are needed.

TSX

Copy
const [advanced, setAdvanced] = createSignal(false);
<Disclosure summary="Advanced settings" icon="ti ti-adjustments" value={advanced} onValueChange={setAdvanced}>
Extra controls
</Disclosure>

Disclosure reveals optional detail without creating another peer view.

Use Disclosure

Use it for advanced settings, explanations, or secondary controls that can stay collapsed. Use Tabs when content areas are peers.

Import

tsx
import { Disclosure } from "@k2b/ui";

Example

tsx
const [advanced, setAdvanced] = createSignal(false);

<Disclosure
  summary="Advanced settings"
  icon="ti ti-adjustments"
  value={advanced}
  onValueChange={setAdvanced}
>
  <AdvancedSettings />
</Disclosure>

Pass value for controlled state or defaultValue for local initial state.

Accessibility

The component preserves native details and summary semantics and occupies only its current content height.

Runtime

Native uncontrolled disclosure works without JavaScript; controlled synchronization requires hydration.

Connect a coding agent

The Cloud skill provides compact working instructions. MCP supplies exact current documentation when details matter.

CLI command
bunx skills add https://docs.example.com

This command installs the working instructions published by this website in the selected coding agent.

For exact, current details, also connect the MCP server through one of the agent tabs.

Installation uses the open-source Vercel Skills CLI.

The skill and MCP complement each other: the skill describes workflows, while MCP supplies current documentation.