howtomakeaname/sumi/forms does not have a README file
fn SegmentedItem::new(value : String, label : String, icon? : Html, trailing? : Html, numeric? : Bool, disabled? : Bool) -> SegmentedItemattachment_strip(
items=[
AttachmentItem::image("cover.png", label="Cover"),
AttachmentItem::document("Brief.pdf"),
],
on_add=pick_files,
on_remove=set_items.map(i => items => items.filteri(fn(j, _) { j != i })),
)chip("720P", selected=quality == "720p", on_click=set_quality.map(v => _ => "720p"))fn input(value~ : String, placeholder? : String, input_type? : InputType, on_input? : Emit[String], on_change? : Emit[String], on_clear? : Cmd, clearable? : Bool, prefix? : Html, suffix? : Html, error? : Bool, error_text? : String, disabled? : Bool, read_only? : Bool, name? : String, maxlength? : Int, autofocus? : Bool, id? : String, class? : String, title? : String, attrs? : Attrs, style? : Array[String]) -> Htmlfn prompt_box(value~ : String, placeholder? : String, rows? : Int, on_input? : Emit[String], on_send? : Cmd, send_disabled? : Bool, send_loading? : Bool, disabled? : Bool, maxlength? : Int, show_count? : Bool, autofocus? : Bool, actions? : Html, id? : String, class? : String, attrs? : Attrs, style? : Array[String]) -> Htmlprompt_box(
value=prompt,
placeholder="Describe what to create",
on_input=emit.map(PromptChanged),
on_send=emit(Submit),
send_disabled=prompt.is_empty(),
maxlength=800,
show_count=true,
)select(
options=[@overlays.MenuItem::new("png", "PNG"), @overlays.MenuItem::new("webp", "WebP")],
value=format,
placeholder="Export format",
open=select_open,
on_open_change=set_select_open.map(v => _ => v),
on_select=set_format.map(v => _ => v),
)slider(
value=35,
value_tooltip=true,
on_input=set_strength.map(v => _ => v),
on_commit=emit(CommitStrength),
suffix="°",
)fn slider_field(value~ : Int, min? : Int, max? : Int, step? : Int, label? : String, unit? : String, ticks? : Array[Int], auto? : Bool, auto_label? : String, on_auto_change? : Emit[Bool], on_input? : Emit[Int], on_commit? : Emit[Int], disabled? : Bool, id? : String, class? : String, attrs? : Attrs, style? : Array[String]) -> Htmlslider_field(
value=duration,
min=0, max=180,
label="Total duration",
unit="s",
ticks=[0, 30, 60, 90, 120, 150, 180],
on_input=set_duration.map(v => _ => v),
)fn textarea(value~ : String, placeholder? : String, rows? : Int, on_input? : Emit[String], on_change? : Emit[String], disabled? : Bool, read_only? : Bool, name? : String, maxlength? : Int, autofocus? : Bool, id? : String, class? : String, title? : String, attrs? : Attrs, style? : Array[String]) -> HtmlInstall
Download zipA UI component library for MoonBit web apps — dark & light themes, overlay motion, zero config
Dependencies