Skip to content

Input groups

Show design guidelines

Text fields can include elements before and after the input using the prepend and append slots.

HTML React Angular
Button
<certara-input placeholder="Enter value">
<certara-button slot="append">Button</certara-button>
</certara-input>
import { CertaraButton, CertaraInput } from '@certara/certara-ui-react';
<CertaraInput placeholder="Enter value">
<CertaraButton slot="append">Button</CertaraButton>
</CertaraInput>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-input placeholder="Enter value">
<certara-button slot="append">Button</certara-button>
</certara-input>

accept

Attributeaccept
Typestring
Defaultundefined
Requiredfalse
DescriptionAccepted file types for file inputs (e.g., “.pdf,.doc”).

disabled

Attributedisabled
Typeboolean
Defaultfalse
Requiredfalse
DescriptionPrevents user interaction.

max

Attributemax
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionMaximum value for number/date inputs.

maxlength

Attributemaxlength
Typenumber
Defaultundefined
Requiredfalse
DescriptionMaximum number of characters allowed.

min

Attributemin
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionMinimum value for number/date inputs.

minlength

Attributeminlength
Typenumber
Defaultundefined
Requiredfalse
DescriptionMinimum number of characters required.

name

Attributename
Typestring
Defaultthis.inputId
Requiredfalse
DescriptionForm control name, used for form submission and validation events.

pattern

Attributepattern
Typestring
Defaultundefined
Requiredfalse
DescriptionRegex pattern the value must match.

placeholder

Attributeplaceholder
Typestring
Defaultundefined
Requiredfalse
DescriptionPlaceholder text shown when empty.

readonly

Attributereadonly
Typeboolean
Defaultfalse
Requiredfalse
DescriptionPrevents editing while allowing selection and copy.

required

Attributerequired
Typeboolean
Defaultfalse
Requiredfalse
DescriptionMarks the field as required for form validation.

size

Attributesize
Type"md" | "sm"
Default'md'
Requiredfalse
DescriptionVisual size variant of the input.

step

Attributestep
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionStep increment for number inputs.

type

Attributetype
Type"date" | "datetime-local" | "email" | "file" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url"
Default'text'
Requiredfalse
DescriptionInput type, affects keyboard on mobile and validation.

value

Attributevalue
Typestring
Defaultundefined
Requiredfalse
DescriptionCurrent value of the input.
NameDescriptionBubbles
certaraBlurEmitted when the input loses focus.true
certaraChangeEmitted when value changes from the previous value.true
certaraFocusEmitted when the input gains focus.true
certaraFormControlErrorEmitted when validation state changes. Payload is the error message or empty string when valid.true
certaraInputEmitted on every keystroke.true
NameSignatureDescription
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.
NameDescription
appendContent placed after the input (e.g., buttons, icons).
prependContent placed before the input (e.g., labels, icons).