Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

bind:value in Input component fails with leptos/nightly feature #19

@decebal

Description

@decebal

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:

  1. Generate nightly-compatible code (use closures instead of bare signals/memos)
  2. 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"] }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions