Description
The Input component generated by ui add input uses bind:value=signal which fails to compile when the leptos/nightly feature is enabled. This is common because the icons crate (also recommended by rust-ui) enables leptos/nightly via its leptos feature flag.
Error
error[E0599]: the method `bind` exists for struct `HtmlElement<Input, ..., ()>`, but its trait bounds were not satisfied
--> src/components/ui/input.rs:67:25
The trait bound Signal<BoolOrT<_>>: IntoProperty is not satisfied, preventing bind:value from working on the generated input element.
Environment
ui-cli v0.3.10
leptos v0.8.17
icons v0.18.0 (enables leptos/nightly)
- Rust edition 2024
Workaround
Replace bind:value=signal with explicit two-way binding:
prop:value=move || signal.get()
on:input=move |ev| signal.set(event_target_value(&ev))
Additional: Separator component
The Separator component has a similar issue — class=merged_class where merged_class is a Memo<String> doesn't satisfy IntoClass under nightly. Fix: class=move || merged_class.get().
Suggestion
Since icons forces leptos/nightly, and rust-ui recommends both icons and leptos_ui, the generated components should be compatible with nightly mode out of the box. Either:
- Generate nightly-compatible code (use closures instead of bare signals/memos)
- Or document the nightly interaction so users know what to expect
Also: strum missing derive feature
ui add input adds strum to Cargo.toml but without the derive feature, causing:
error[E0432]: unresolved import `strum::AsRefStr`
The workspace dep should be strum = { version = "0.28", features = ["derive"] }.