Input works alongside the native HTML input element, with additional custom styling and functionality.
import { DaffInputComponent } from '@daffodil/design/input'
DaffInputComponent provides the same functionality as a native <input> and contains custom styling and functionality.
@Component()
class DaffInputComponent extends DaffFormFieldControl<string> implements DaffFormFieldControl<string>, OnInit {
readonly supportsAutoLabelling: boolean = true
readonly id: string
get raised(): boolean
get state(): DaffFormFieldState
_stateChanges: BehaviorSubject = new BehaviorSubject({
focused: false,
filled: false,
disabled: false,
error: false,
valid: true,
})
stateChanges: Observable<DaffFormFieldState>
emitState(deferred: boolean = false): void
}
boolean| Default | true |
|---|---|
| Description | Whether the control supports automatic label behavior.
When Defaults to |
string| Default | – |
|---|---|
| Description | The unique identifier for the control element. |
boolean| Default | – |
|---|---|
| Description | Whether the label should be in the raised position. By default, matches the focused state. |
DaffFormFieldState| Default | – |
|---|---|
| Description | Computes the current state of the form field control. Combines control properties and form validation state. |
BehaviorSubject| Default | new BehaviorSubject({
focused: false,
filled: false,
disabled: false,
error: false,
valid: true,
}) |
|---|---|
| Description |
Observable| Default | – |
|---|---|
| Description | Observable stream of state changes for the form field control. |
voidEmits the current state.
| Parameter | deferred: boolean |
|---|---|
| Default | false |
| Description |
import { DaffInputModule } from '@daffodil/design/input'
@NgModule()
class DaffInputModule {}