Names the failure.
Primitive contract
ErrorState
Names a failure, preserves source or reference context, and exposes explicit recovery without blame or false certainty.
Recoverable failure explanation · @sanchika/primitivesPurpose and semantics
Names a failure, preserves source or reference context, and exposes explicit recovery without blame or false certainty.
Recommended semantic: Use a labelled section; dynamic errors may use alert or status when context requires it, without moving focus automatically.
Anatomy
Explains what is known.
Explicit retry or safe next step.
Optional support path.
Optional source or reference ID.
Optional native disclosure.
Finite variants and important states
- Variant · severity
- recoverable, blocking
- Required states
- recoverable, blocking, with-details
- Class hooks
.sk-error-state · .sk-error-state-blocking · .sk-error-state__actions · .sk-error-state__reference · .sk-error-state__details
Composed synthetic exemplar
Rendered state matrix
ErrorState: 3 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.
Could not copy the reference
Copy it manually or try again.
Reference COPY-EXAMPLE-01
Could not copy the reference
Copy it manually or try again.
Reference COPY-EXAMPLE-01
Could not copy the reference
Copy it manually or try again.
Reference COPY-EXAMPLE-01
Accessibility and consumer responsibility
- Retry and support actions use native controls
- Dynamic errors do not steal focus
- Choose alert/status only for actual dynamic context
- Keep reference and recovery in reading order
- Choose announcement semantics
- Implement retry
- Sanitize technical detail
- Preserve focus
- Actions wrap and details remain reachable
No override is required.
- Boundary, wording, and actions remain visible
Compact API reference
- Package
@sanchika/primitives- CSS
@sanchika/primitives/styles.css- Contract
primitiveSpecs.find((contract) => contract.name === "ErrorState")- Primary class
.sk-error-state