Nine components.
Zero trust.
Security-hardened Custom Elements with XSS prevention, CSRF protection, and audit logging on by default. Any framework. Any stack.
What makes Secure-UI different
Standard HTML elements and UI libraries handle presentation. Secure-UI handles security — baked in, not bolted on.
Closed Shadow DOM
Field values live inside a closed shadow root. element.shadowRoot returns null — injected scripts, browser extensions, and devtools cannot read or tamper with the internal DOM. Validation state and form data stay private until submission.
Behavioral Telemetry
Every interaction is measured: focus timing, typing velocity, paste events, zero-keystroke fills. <secure-telemetry-provider> adds device signals — headless detection, webdriver presence, devtools state — signed with HMAC-SHA-256. Bot detection with no user friction.
Audit Trail by Default
Every injection attempt, validation failure, and selection change dispatches a secure-audit CustomEvent. Blocked inputs record the exact value attempted. Your server receives a complete, timestamped interaction history with every submission.
| Capability | <input> | MUI / ShadCN | <secure-input> |
|---|---|---|---|
| Closed Shadow DOM (script-proof) | — | — | Yes |
| Behavioral telemetry | — | — | Yes |
| Headless / bot detection | — | — | Yes |
| Tamper-proof audit log | — | — | Yes |
| XSS sanitization | — | Partial | Yes |
| Security tiers (public / sensitive / critical) | — | — | Yes |
| Works without JavaScript | Yes | — | Yes |
| Runtime dependencies | 0 | 200+ | 0 |
Wraps a form to collect bot-detection signals and attach a HMAC-signed envelope to every submission.
- Replaces CAPTCHA — no user friction
- Headless, webdriver, and DevTools detection
- HMAC-SHA-256 signed signals
Security-hardened text input with XSS prevention, type validation, and audit logging.
- All HTML5 input types
- Security tier enforcement
- Pattern and length validation
Dropdown select with option injection prevention and value allowlist enforcement.
- Option injection prevention
- Value allowlist enforcement
- Multiple selection support
Multi-line text area with content sanitization and paste attack prevention.
- Content sanitization on input
- Paste sanitization
- Length enforcement
Form wrapper with automatic CSRF token injection, submission audit logging, and behavioral telemetry integration.
- CSRF token injection
- Form action enforcement
- Field coordination
File upload with MIME type validation, magic number verification, and size enforcement.
- MIME type validation
- Magic number verification
- Scan hook integration
Date and time picker with input sanitization, range enforcement, and timezone handling.
- Range enforcement (min/max)
- Timezone normalization
- All date/time subtypes
Data table with XSS-safe rendering, sort/filter sanitization, and column injection prevention.
- XSS-safe data rendering
- Sortable and filterable
- Pagination support
Linked new-password and confirm-password fields with match validation, strength enforcement, and animated show/hide toggle.
- Match validation on blur
- Strength rules enforced
- Raw value never in events
Payment card input with Luhn validation, 3D preview, card type detection, and PAN/CVC protection.
- Full PAN never exposed
- Luhn + card type validation
- Animated 3D card preview
Works everywhere.
Built on the W3C Custom Elements v1 specification — real HTML elements with no virtual DOM, no framework runtime, no build step. Security enforcement lives inside the Shadow DOM and cannot be bypassed by the host application.