rc-disclosure
Disclosure wrapper for a native <details>/<summary> pair with controlled open state, following the WAI-ARIA Disclosure pattern.
- Package
@rcarls/rc-disclosure- Element
<rc-disclosure>- Native dependency
- Requires a native details child
- State model
- Controlled or uncontrolled open state
- Main events
rc-disclosure-toggle- Related
- Theme previews
Installation
- npm
- Yarn
npm install @rcarls/rc-disclosure
yarn add @rcarls/rc-disclosure
import '@rcarls/rc-disclosure/define';
Live demo
Theming
The default demo mode shows the component without a package theme. Use the shared preview controls on this page to compare inherited, light, and dark color schemes or to apply the optional Material theme only inside the demo frames.
API
Properties
| Property | Markup | Type | Default | Description |
|---|---|---|---|---|
open | JS property only | boolean | Not specified | Current open state mirrored to the child `<details>`. |
fragment | JS property only | boolean | Not specified | No description provided. |
Methods
No public methods are documented in the custom elements manifest.
Events
| Event | Detail type | Description |
|---|---|---|
rc-disclosure-toggle | No detail type documented | Fires when the child `<details>` toggles. |
Slots
No slots are documented in the custom elements manifest.
CSS Custom Properties
No CSS custom properties are documented in the custom elements manifest.
CSS Parts
No CSS parts are documented in the custom elements manifest.