Skip to main content

dart_html_dsl 0.0.3 copy "dart_html_dsl: ^0.0.3" to clipboard
dart_html_dsl: ^0.0.3 copied to clipboard

A type-safe Dart DSL for building HTML, CSS, and JavaScript using pure Dart code, with scoped styles, pseudo-classes, and component-based architecture.

example/dart_html_dsl_example.dart

import 'dart:io';

import 'package:dart_html_dsl/src/core/index.dart';

import 'home_page.dart';

final h1Key = DomKey();

void main() {
  final html = HomePage(
    pageProps: PageProps(
      title: 'Dart Html DSL',
      minify: false,
      // headers: [CssHeaderLink.href('style.css'), CssHeaderLink.shortcutIcon()],
      cssStyles: [
      CssStyle.fromSource('* {margin:0;padding:0;}'),
      ]
    ),
  );

  final file = File('index.html');
  file.writeAsString(html.renderHtml());
}
0
likes
140
points
62
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A type-safe Dart DSL for building HTML, CSS, and JavaScript using pure Dart code, with scoped styles, pseudo-classes, and component-based architecture.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on dart_html_dsl