Skip to content

BulkTextarea

BulkTextarea

jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea />

NSBulktextarea.Props

NameTypeDescription
value["value"] The current value
onChange["onBlur"] Callback triggered when the onBlur event is emmited
placeholder["placeholder"] Placeholder text
size["size"] Component size
state["state"] State for show errors or valid(green) borders
disabled["disabled"] Defines whether the textarea is disabled
readonly["readonly"] Defines whether the textarea is readonly
minRows["minRows"] Minimum number of rows to display
maxRows["maxRows"] Maximum number of rows to display
validateOn["validateOn"] An event when a validation occurs
lineValidation["lineValidation"] A function to valide the line
linesDelimiters["linesDelimiters"] Line delimeters
pasteProps["pasteProps"] Defines the props for paste action
maxLines["maxLines"] Maximum number of allowed lines/values
lineProcessing["lineProcessing"] Function to process individual lines during input
errorsArray<> List of errors
showErrorsboolean Defines whether to show errors or not

BulkTextarea.InputField

jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.InputField />

NSBulktextarea.InputField.Props

& {...}
NameTypeDescription
idstring Unique id
placeholderstring | string[] Placeholder for field. For multiline placeholder use an array of strings
valuestring | string[] String to render in textarea. OnChanging value, it will go throw paste pipeline
onBlur(value: string | string[], e: ) => void This component doesn't have default onChange callback, because we think that you need only the result after every changes/fixes
size"m" | "l" Size of component
state"normal" | "valid" | "invalid" State for show errors or valid(green) borders
disabledboolean Flag for disabling field
readonlyboolean Flag for readonly field
minRowsnumber Min rows
maxRowsnumber Max rows
validateOn("blur" | "blurLine" | "paste")[] List of available points to validate value
lineValidation(line: string, lines: string[]) => {isValid: boolean; errorMessage: string } Function to validate line
commonErrorMessagestring Message for display error about whole field, not only one line. If set empty string, field will not have invalid state.
linesDelimitersstring[] Delimiters (event.key) for lines
maxLinesnumber Count of max lines in badge
pasteProps {delimiter?: string | ; lineProcessing?: (line: string, lineIndex: number, totalLinesCount: number) => string; skipEmptyLines?: boolean } Paste props
lineProcessing(line: string, lines: string[]) => string Function for process line after it was blurred

BulkTextarea.ErrorsNavigation

jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.ErrorsNavigation />

NSBulktextarea.ErrorsNavigation.Props

NameTypeDescription
errorIndexnumber
onPrevError() => void
onNextError() => void
errorsCountnumber
size"m" | "l"
showErrorsboolean
disabledboolean
nextButtonRef
prevButtonRef

BulkTextarea.ClearAll

ClearAll has the same properties as Button.

jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.ClearAll />

BulkTextarea.Counter

jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.Counter />

NSBulktextarea.Counter.Props

NameTypeDescription
theme["theme"]
linesCountnumber
maxLinesnumber

Released under the MIT License.

Released under the MIT License.