# Input
```rust demo
let value = RwSignal::new(String::from("o"));
view! {
}
```
## Prefix & Suffix
```rust demo
let value = RwSignal::new(String::from("o"));
view! {
"$"
".00"
}
```
### Disabled
```rust demo
let value = RwSignal::new(String::from("o"));
view! {
}
```
### Placeholder
```rust demo
view! {
}
```
### Invalid
```rust demo
let value = RwSignal::new(String::from("o"));
view! {
}
```
### Imperative handle
```rust demo
let value = RwSignal::new(String::from("o"));
let input_ref = ComponentRef::::new();
let focus = Callback::new(move |_| {
input_ref.get_untracked().unwrap().focus()
});
let blur = Callback::new(move |_| {
input_ref.get_untracked().unwrap().blur()
});
view! {
}
```
### Input attrs
```rust demo
view! {
}
```
### Input Props
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| class | `OptionalProp>` | `Default::default()` | Addtional classes for the input element. |
| value | `Model` | `Default::default()` | Set the input value. |
| variant | `MaybeSignal` | `InputVariant::Text` | Input's variant. |
| placeholder | `OptionalProp>` | `Default::default()` | Placeholder of input. |
| disabled | `MaybeSignal` | `false` | Whether the input is disabled. |
| invalid | `MaybeSignal` | `false` | Whether the input is invalid. |
| allow_value | `Option>` | `None` | Check the incoming value, if it returns false, input will not be accepted. |
| on_focus | `Option>` | `None` | Callback triggered when the input is focussed on. |
| on_blur | `Option>` | `None` | Callback triggered when the input is blurred. |
| attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. |
### Input Slots
| Name | Default | Description |
| ----------- | ------- | -------------------- |
| InputPrefix | `None` | InputPrefix content. |
| InputSuffix | `None` | InputSuffix content. |
### Input Ref
| Name | Type | Description |
| ----- | ----------- | ------------------------ |
| focus | `Fn(&self)` | Focus the input element. |
| blur | `Fn(&self)` | Blur the input element. |
### TextArea Props
Removes variant and slot from Input component.