Native open-state owner.
Primitive contract
Disclosure
Styles details and summary for FAQ or simple disclosure while preserving native open/closed and keyboard behavior.
Native progressive disclosure · @sanchika/primitivesPurpose and semantics
Styles details and summary for FAQ or simple disclosure while preserving native open/closed and keyboard behavior.
Recommended semantic: Use native details and summary; associate a nearby heading when the disclosure needs section structure.
Anatomy
Keyboard-operable accessible name.
Revealed flow content.
Finite variants and important states
- Required states
- closed, open, long-content, nested-guidance
- Class hooks
.sk-disclosure · .sk-disclosure__summary · .sk-disclosure__content
Composed synthetic exemplar
Rendered state matrix
Disclosure: 4 required states
Each specimen starts from the package-owned example and contract state inventory. Simulated pointer and focus frames are labelled; consumers still verify real interaction in context.
Source detail
Synthetic reference only.
Source detail
Synthetic reference only.
Source detail
Synthetic reference only.
Source detail
Synthetic reference only.
Accessibility and consumer responsibility
- Native summary toggles with keyboard
- Do not trap focus
- Do not clip revealed focusable content
- Summary is the accessible name
- Document heading relationship
- Retain native expanded state
- Use native semantics
- Keep summary descriptive
- Add script only for documented unmet native need
- Summary and long content wrap without horizontal overflow
Revealed content appears immediately in its settled position.
- Summary focus and disclosure boundary use system colors
Compact API reference
- Package
@sanchika/primitives- CSS
@sanchika/primitives/styles.css- Contract
primitiveSpecs.find((contract) => contract.name === "Disclosure")- Primary class
.sk-disclosure