LiveAntd.Components.Input (live_antd v0.1.0)

A basic widget for getting the user input is a text field. Keyboard and mouse can be used for providing or changing data.

API

  • [ ] addonAfter: The label text displayed after (on the right side of) the input field ReactNode -
  • [ ] addonBefore: The label text displayed before (on the left side of) the input field ReactNode -
  • [ ] allowClear: If allow to remove input content with clear icon boolean false
  • [x] bordered: Whether has border style boolean true 4.5.0
  • [x] defaultValue: The initial input content string -
  • [x] disabled: Whether the input is disabled boolean false
  • [x] id: The ID for input string -
  • [ ] maxLength: The max length number
  • [x] placeholder: input placeholder.
  • [x] prefix: The prefix icon for the Input ReactNode -
  • [x] suffix: The suffix icon for the Input
  • [x] size: The size of the input box. Note: in the context of a form, the large size is used large | middle | small -
  • [ ] type: The type of input, see: MDN( use Input.TextArea instead of type="textarea") string text
  • [x] value: The input content value string -
  • [x] onChange: Callback when user input function(e) -
  • [x] onPressEnter: The callback function that is triggered when Enter key is pressed function(e)

Example

<Input

disabled
value={{@value}}
size={{@size}}

Properties

  • onChange :event
  • onPressEnter :event
  • bordered :boolean, default: true
  • defaultValue :string
  • disabled :boolean, default: false
  • allowClear :boolean
  • id :any
  • size :string, values: ~w(lg sm middle), default: "middle"
  • prefix :any
  • suffix :any
  • placeholder :string, default: "input..."
  • value :string
  • class :css_class
  • style :string

Link to this section Summary

Link to this section Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Link to this function

render(assigns)

Callback implementation for Phoenix.LiveComponent.render/1.

Link to this function

render_basic_input(assigns)