anathema-extras 0.1.0

Additional components for Anathema
Documentation
  • Coverage
  • 0%
    0 out of 15 items documented0 out of 9 items with examples
  • Size
  • Source code size: 36.05 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.21 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 38s Average build duration of successful builds.
  • all releases: 38s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • togglebyte/anathema-extras
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • togglebyte

Anathema extras

This crate contains third party components for Anathema.

Input

A single line input field.

builder
    .default::<Input>("input", Input::template())
    .unwrap();

The input component can be registered as a prototype as well.

builder
    .prototype("input", Input::template(), Input::new, InputState::new)
    .unwrap();

Supported events:

The following events are provided:

on_enter

The enter key was pressed. This event publishes anathema_extras::Text, which implements Deref<str>.

on_change

A change was made to the text (insert or remove). This event publishes anathema_extras::InputChange.

on_focus

The input component gained focus. This event publishes ().

on_blur

The input component lost focus. This event publishes ().

Attributes

clear_on_enter

If the desired outcome is to retain the text when the enter key is pressed set this attribute to false.

@input [clear_on_enter: false]

Example

vstack
    @input (on_enter->update_label_a)
    @input (on_enter->update_label_b)

Button