Pure MoonBit HTML components matching a pinned subset of Cloudflare Kumo
moon add f4ah6o/yami_kumolet brand = @yami_kumo.text("Workspace")
let main = @yami_kumo.text_component(
@yami_kumo.text("Project settings"),
variant=@yami_kumo.Heading,
size=@yami_kumo.Lg,
)
let shell = @yami_kumo.app_shell(brand, main)
let html = @yami_kumo.render_html(shell)pub struct Attribute {
// private fields
}pub(all) enum ButtonVariant {
Primary
Secondary
Ghost
Destructive
SecondaryDestructive
Outline
}pub(all) enum ControlSize {
Xs
Sm
Base
Lg
}pub struct Html {
// private fields
}pub enum HtmlError {
InvalidTag(String)
InvalidAttributeName(String)
UnsafeAttribute(String)
UnsafeUrl(String)
DuplicateAttribute(String)
VoidElementHasChildren(String)
}pub(all) enum InputVariant {
Default
Error
}pub(all) enum TextVariant {
Heading
Body
Secondary
Success
Error
Mono
MonoSecondary
}fn app_shell(brand : Html, main : Html, navigation_trigger? : Html, global_search? : Html, header_actions? : Html, account_menu? : Html, rail? : Html, sidebar? : Html, tabs? : Html, context_panel? : Html, context_panel_label? : String, bottom_bar? : Html, sidebar_collapsed? : Bool, mobile_sidebar_open? : Bool, context_panel_open? : Bool, primary_navigation_label? : String, workspace_navigation_label? : String, close_workspace_navigation_label? : String, close_context_panel_label? : String) -> Htmlfn button(children : Html, variant? : ButtonVariant, size? : ControlSize, disabled? : Bool, button_type? : String, class_name? : String, attrs? : Array[Attribute]) -> Htmlfn input(id~ : String, size? : ControlSize, variant? : InputVariant, label? : Html, description? : Html, error? : Html, placeholder? : String, disabled? : Bool, required? : Bool, class_name? : String, attrs? : Array[Attribute]) -> Htmlfn text_component(children : Html, variant? : TextVariant, size? : ControlSize, as_element? : String, bold? : Bool, truncate? : Bool, class_name? : String, attrs? : Array[Attribute]) -> HtmlInstall
Download zipPure MoonBit HTML components matching a pinned subset of Cloudflare Kumo