Menu
Components
Disclosure
Live compiled demo for the Disclosure component contract.
Orders over $50 ship free.
| data-state | open, closed, disabled |
|---|---|
| keyboard | Space or Enter activates the disclosure button |
| change reasons | trigger-click, programmatic |
Usage
A scripted reveal pairing a <button aria-expanded> trigger with a controlled region, for show/hide cases that need full control over a non-native trigger and content.
- Import the versioned component from
@kovojs/ui/disclosure. - Copy the source into your app with
kovo add disclosurewhen product code should own the implementation.
Source
- Package source:
packages/ui/src/disclosure.tsx - Gallery fixture:
examples/gallery/src/demo-fixtures.tsx - Interactive demo:
examples/gallery/src/interactive/disclosure-demo.tsx
Behavior contract
The rendered fixture above includes the component contract table. Interactive pages compile the authored TSX demo and then lift the same contract table from the static fixture, so the visible behavior and documented ARIA/data-state surface stay together.