Skip to main content

Crate hyperchad_renderer_html

Crate hyperchad_renderer_html 

Source
Expand description

HTML renderer for HyperChad UI framework.

This crate provides HTML rendering capabilities for HyperChad applications, converting HyperChad containers into HTML elements with CSS styling. It supports responsive design through media queries and can integrate with various web frameworks.

§Features

  • HTML rendering with CSS styling and responsive design
  • Support for multiple backend integrations (Actix, Lambda, custom web servers)
  • Static asset routing
  • Extensible renderer with custom event handling
  • Canvas rendering support

§Example

use hyperchad_renderer_html::{DefaultHtmlTagRenderer, HtmlRenderer};
use hyperchad_renderer_html::stub::StubApp;

let tag_renderer = DefaultHtmlTagRenderer::default();
let app = StubApp::new(tag_renderer);
let renderer = HtmlRenderer::new(app);

§Feature Flags

  • actix - Enables Actix web framework integration
  • lambda - Enables AWS Lambda integration
  • web-server - Enables custom web server support
  • assets - Enables static asset routing
  • extend - Enables renderer extension capabilities
  • sse - Enables server-sent events support (requires actix)

Re-exports§

pub use actix::router_to_actix;
pub use lambda::router_to_lambda;

Modules§

actix
Actix Web framework integration for HTML rendering.
extend
Extensions for custom HTML renderer behavior.
html
HTML and CSS conversion utilities for HyperChad containers.
lambda
AWS Lambda integration for HTML rendering.
stub
Stub implementations for testing and minimal rendering scenarios.

Structs§

DefaultHtmlTagRenderer
Default implementation of HTML tag rendering with responsive trigger support.
HtmlRenderer
HTML renderer that wraps an HTML application and manages rendering state.

Traits§

HtmlApp
Trait for HTML application implementations that handle rendering and configuration.