Morph
FeaturesHow it WorksCodeCLIDocs
← Docs Home
Getting Started
  • Introduction
  • Installation
  • Quick Start
  • Configuration
  • Project Structure
Concepts
  • How It Works
  • Dev Mode
  • Build Mode
Elements
  • HTML Elements
  • Conditional Rendering
  • Events
CSS
  • CSS Properties
  • Animations
  • Transitions
  • Transforms
  • Flexbox
  • Tailwind CSS
JavaScript
  • Overview
  • State
  • Effects
  • Async & Networking
  • Runtime Types
Guides
  • C++ / JSX Interop
  • Custom C++ Nodes
  • Dynamic Styles
CLI
  • CLI Commands
Examples
  • Calculator
  • Dynamic
  • IP Checker
← All docs
Fetching documentation…
Morphby Levizr
GitHubDocsLicense

IP Checker

Async networking example that fetches and displays the user's public IP address.

Files

File Description
src/App.mx JSX template with async state
src/style.css Animations (fade, bounce, glow)
morph.config.json Window config (400×300)

Features Demonstrated

  • fetch() for HTTP requests (worker-thread, non-blocking)
  • Coroutine-based async/await
  • morphState with multiple signals: ip, loading, error
  • Error handling with try/catch in coroutines
  • Dynamic className ternaries driven by state
  • CSS @keyframes (fade-in, bounce, glow)
  • Tailwind utilities + custom animations

Run

morph run

See the full README for more details.

← PreviousDynamic