Skip to main content
SmarterElements is a JavaScript library for embedding isolated UI components into web applications. Components run in secure, isolated contexts with automatic resizing, modal support, and seamless parent-child communication.

What are SmarterElements?

SmarterElements are embeddable UI components that provide:
  • Isolation: Components run in isolated contexts for security
  • Automatic Resizing: Content-driven sizing with smooth transitions
  • Modal System: Overlay display with backdrop blur and focus management
  • Event Communication: Bidirectional messaging between parent and element
  • Size Constraints: Flexible width/height limits with CSS unit support

Key Features

  • Secure Isolation: Each element runs in its own isolated sandbox
  • Modal & DOM Mounting: Display elements inline or as overlay modals
  • Auto-Resizing: Elements automatically adjust to content size
  • React Integration: Dedicated hooks and components for React apps
  • CDN Ready: Direct script inclusion without build tools
  • Utility Functions: Built-in debounce and throttle for performance
  • TypeScript Support: Full type definitions included

Architecture

Element Types

  • BlockKit Renderer: Dynamic UI rendering from JSON configurations
  • Custom Elements: Application-specific components
  • Modal Elements: Overlay components with backdrop and focus management

Integration Patterns

  • DOM Mounting: Embed elements directly into existing containers
  • Modal Display: Show elements as overlay modals with auto-sizing
  • React Components: Use dedicated React hooks and components
  • Vanilla JavaScript: Direct API usage without frameworks

Installation

NPM Package

CDN (Browser)

React Integration

Quick Start

Vanilla JavaScript

React Hook

Utility Functions