本文へスキップ

Input

ネイティブのキーボードとテキストサービスに対応した、コアが管理する制御テキストエディターです。

デモを読み込み中…

#インポート

quickgui から text_input をインポートします。

use quickgui::*;

#使い方

text_input(name.as_str())
    .placeholder("Name")
    .on_input(edit)

#API リファレンス

項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。

pub fn text_input(value: impl Into<Arc<str>>) -> Element

Create a controlled, single-line text input. Attach a stable [`crate::InputListener`] with [`Element::on_input`].

on_inputpub fn on_input<V>(mut self, listener: crate::InputListener<V>) -> Self—

Attach a controlled-value listener registered by [`crate::ViewContext::input_listener`].

pub fn on_input<V>(mut self, listener: crate::InputListener<V>) -> Self
ソースを見る
placeholderpub fn placeholder(mut self, placeholder: impl Into<Arc<str>>) -> Self—

Set placeholder text for a [`text_input`] element.

pub fn placeholder(mut self, placeholder: impl Into<Arc<str>>) -> Self
ソースを見る
childpub fn child(mut self, child: impl IntoElement) -> Self—

Configures child for this part.

pub fn child(mut self, child: impl IntoElement) -> Self
ソースを見る