Text field
With label and help text
Section titled “With label and help text”Input types
Section titled “Input types”certara-input
Section titled “certara-input”Properties
Section titled “Properties”accept
| Attribute | accept |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Accepted file types for file inputs (e.g., “.pdf,.doc”). |
disabled
| Attribute | disabled |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Prevents user interaction. |
max
| Attribute | max |
| Type | number | string |
| Default | undefined |
| Required | false |
| Description | Maximum value for number/date inputs. |
maxlength
| Attribute | maxlength |
| Type | number |
| Default | undefined |
| Required | false |
| Description | Maximum number of characters allowed. |
min
| Attribute | min |
| Type | number | string |
| Default | undefined |
| Required | false |
| Description | Minimum value for number/date inputs. |
minlength
| Attribute | minlength |
| Type | number |
| Default | undefined |
| Required | false |
| Description | Minimum number of characters required. |
name
| Attribute | name |
| Type | string |
| Default | this.inputId |
| Required | false |
| Description | Form control name, used for form submission and validation events. |
pattern
| Attribute | pattern |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Regex pattern the value must match. |
placeholder
| Attribute | placeholder |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Placeholder text shown when empty. |
readonly
| Attribute | readonly |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Prevents editing while allowing selection and copy. |
required
| Attribute | required |
| Type | boolean |
| Default | false |
| Required | false |
| Description | Marks the field as required for form validation. |
size
| Attribute | size |
| Type | "md" | "sm" |
| Default | 'md' |
| Required | false |
| Description | Visual size variant of the input. |
step
| Attribute | step |
| Type | number | string |
| Default | undefined |
| Required | false |
| Description | Step increment for number inputs. |
type
| Attribute | type |
| Type | "date" | "datetime-local" | "email" | "file" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" |
| Default | 'text' |
| Required | false |
| Description | Input type, affects keyboard on mobile and validation. |
value
| Attribute | value |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Current value of the input. |
Events
Section titled “Events”| Name | Description | Bubbles |
|---|---|---|
certaraBlur | Emitted when the input loses focus. | true |
certaraChange | Emitted when value changes from the previous value. | true |
certaraFocus | Emitted when the input gains focus. | true |
certaraFormControlError | Emitted when validation state changes. Payload is the error message or empty string when valid. | true |
certaraInput | Emitted on every keystroke. | true |
Methods
Section titled “Methods”| Name | Signature | Description |
|---|---|---|
setBlur | () => Promise<void> | Programmatically blurs the input. |
setError | (error: string) => Promise<void> | Sets a custom error message. This allows consumers to call input.setError('my error message') instead of input.setAttribute('error', 'my error message'). |
setFocus | () => Promise<void> | Programmatically focuses the input. |
| Name | Description |
|---|---|
append | Content placed after the input (e.g., buttons, icons). |
prepend | Content placed before the input (e.g., labels, icons). |