@wix/design-system
Version:
@wix/design-system
72 lines (69 loc) • 3.02 kB
Markdown
### className
- type: string
- description: Specifies a CSS class name to be appended to the component's root element.
- internal
### dataHook
- type: string
- description: Applies a data-hook HTML attribute that can be used in the tests
### disabled
- type: boolean
- description: Specifies whether input should be disabled or not
### readOnly
- type: boolean
- description: Specifies whether input is read only
### initialValue
- type: string
- description: Defines an initial value to display
- default: ''
### multiline
- type: boolean
- description: Specifies whether component allow multiple lines or not. If false, text won't wrap and horizontal scroll will appear inside of a component.
- default: true
### onChange
- type: (value: string) => void
- description: Defines a callback function that is called each time value is changed:
`onChange(value: String): void`
### onSubmit
- type: (value: string) => void
- description: Defines a callback function that is called on value submit, in other words after `insertVariable()` and `setValue()` and `insertText()`
`onSubmit(value: String): void`
### onBlur
- type: (value: string) => void
- description: Defines a callback function that is called on focus out:
`onBlur(value: String): void`
### onFocus
- type: (value: string) => void
- description: Defines a callback function that is called on focus in:
`onFocus(value: String): void`
### status
- type: "loading" | "error" | "warning" | "success"
- description: Specify the status of a field
### statusMessage
- type: ReactNode
- description: Defines the message to display on status icon hover. If not given or empty there will be no tooltip.
### placeholder
- type: string
- description: Sets a placeholder message to display
### rows
- type: number
- description: Set the height of a component to fit the given number of rows
- default: 1
### size
- type: "tiny" | "small" | "medium" | "large"
- description: Controls the size of the input and variable tags
### variableParser
- type: (value: string) => string | boolean
- description: Defines the variable keys that component will parse and convert to <Tag/> components on blur and while using `insertVariable`.
For each key `variableParser` will be called and should return a proper text for that key or false in case the key is invalid.
`variableParser(key: String): String|boolean`
### variableTagPropsParser
- type: (value: string) => Partial<TagProps>
- description: A function callback that is being called on each keyboard enter and expects a return of object with properties meant for Tag component.
It is designed to dynamically determine the styling or properties applied to variable tags within the input field.`
### spellCheck
- type: boolean
- description: Specifies whether spellcheck is enabled
- default: false
### variableTemplate
- type: { prefix: string; suffix: string; }
- description: Defines a template for variable recognition. Typed text strings with matching prefix and suffix symbols will be converted to <Tag/> components.