Blazorise On-screen Keyboard API

Explore the Blazorise On-screen Keyboard API reference for parameters, events, methods, and related types.

For examples and usage guidance, see the On-screen Keyboard documentation.

API

Parameters

OnScreenKeyboardProvider

Parameter Description TypeDefault
AriaLabel

Gets or sets the keyboard aria-label.

string"On-screen keyboard"
ChildContent

Gets or sets custom keyboard content.

RenderFragmentnull
KeyboardSize

Gets or sets the keyboard visual width.

OnScreenKeyboardSize?null
KeyColor

Gets or sets the button color.

ColorColor.Secondary
KeyLayout

Gets or sets the key arrangement inside keyboard rows.

OnScreenKeyboardKeyLayout?null
KeyMinHeight

Gets or sets the key minimum height, in pixels.

int?null
KeyOutline

Gets or sets whether key buttons should be outlined.

booltrue
KeySize

Gets or sets the button size.

Possible values:Default, ExtraSmall, Small, Medium, Large, ExtraLarge

SizeSize.Default
KeyTabIndex

Gets or sets the tab index for rendered key buttons.

int?-1
KeyTemplate

Gets or sets the template used to render each keyboard key content.

RenderFragment<OnScreenKeyboardKeyContext>null
KeyWidth

Gets or sets the base key width, in pixels, used by centered key layout.

int?null
Placement

Gets or sets the keyboard placement.

OnScreenKeyboardPlacement?null
ShowSpecialCharactersKey

Gets or sets whether text keyboards should show a key that toggles special characters.

boolfalse
SpecialCharactersRows

Gets or sets the rows used when the special characters keyboard is active.

IReadOnlyList<IReadOnlyList<OnScreenKeyboardKey>>null
ZIndex

Gets or sets the CSS z-index used by the fixed keyboard placement. When not set, the current style provider default is used.

int?null

BaseOnScreenKeyboardInputComponent

Parameter Description TypeDefault
AriaDescribedBy

Specifies the aria-describedby attribute value.

Remarks

When set, this value is rendered as-is and overrides help and validation message ids generated by Field and Validation.

string
AriaInvalid

Specifies the aria-invalid attribute value.

Remarks

When set, this value is rendered as-is and overrides the validation-derived aria-invalid state.

string
AriaLabelledBy

Specifies the aria-labelledby attribute value.

Remarks

When set, this value is rendered as-is. Some non-labelable controls can otherwise derive it automatically from a parent FieldLabel or FieldsLabel.

string
AriaRequired

Specifies the aria-required attribute value.

Remarks

When set, this value overrides the required-field state resolved from the parent Validation.

boolfalse
Autofocus

Set's the focus to the component after the rendering is done.

boolfalse
ChildContent

Specifies the content to be rendered inside this BaseOnScreenKeyboardInputComponent.

RenderFragmentnull
Disabled

Add the disabled boolean attribute on an input to prevent user interactions and make it appear lighter.

boolfalse
Feedback

Placeholder for validation messages.

RenderFragmentnull
OnScreenKeyboard

Enables the on-screen keyboard for this input component. When not explicitly set, the global accessibility option is used.

boolfalse
OnScreenKeyboardEnterKeyBehavior

Specifies how the on-screen keyboard enter key should behave for this input component.

Possible values:Default, NewLine, Submit, Hide, KeyDown

OnScreenKeyboardEnterKeyBehaviorOnScreenKeyboardEnterKeyBehavior.Default
OnScreenKeyboardLayout

Specifies the on-screen keyboard layout for this input component. When not explicitly set, the global accessibility option is used.

Possible values:Text, Numeric, Decimal, Email, Url, Telephone

OnScreenKeyboardLayoutOnScreenKeyboardLayout.Text
OnScreenKeyboardShowMode

Gets or sets how the on-screen keyboard is shown for this input.

Possible values:Default, Focus, Manual

OnScreenKeyboardShowModeOnScreenKeyboardShowMode.Default
ReadOnly

Add the readonly boolean attribute on an input to prevent modification of the input’s value.

boolfalse
Size

Sets the size of the input control.

Size?null
TabIndex

If defined, indicates that its element can be focused and can participates in sequential keyboard navigation.

int?null
Value

Specifies the value inside the input field.

TValuenull
ValueExpression

Specifies an expression that identifies the input value.

Expression<Func<TValue>>null

BlazoriseOnScreenKeyboardOptions

Parameter Description TypeDefault
AutoScroll

If true, the focused input is scrolled into view when it would be covered by the on-screen keyboard.

booltrue
AutoScrollMargin

Gets or sets the viewport margin, in pixels, kept between the focused input and the on-screen keyboard during automatic scrolling.

int12
DefaultLayout

Gets or sets the default keyboard layout. When not set, each input component chooses its own layout.

OnScreenKeyboardLayout?null
Enabled

If true, input components can show the on-screen keyboard when they receive focus.

boolfalse
EnterKeyBehavior

Gets or sets how the on-screen keyboard enter key should behave.

Possible values:Default, NewLine, Submit, Hide, KeyDown

OnScreenKeyboardEnterKeyBehaviorOnScreenKeyboardEnterKeyBehavior.Default
HideOnBlur

If true, the on-screen keyboard is hidden when the active input loses focus.

booltrue
HideOnEnter

If true, the on-screen keyboard is hidden when the enter key is pressed.

booltrue
InputTypes

Gets or sets the input types enabled by the global on-screen keyboard option.

Possible values:None, Text, Numeric, Date, Time, Pickers, All

OnScreenKeyboardInputTypeOnScreenKeyboardInputType.Text | OnScreenKeyboardInputType.Numeric
KeyboardSize

Gets or sets the default keyboard visual width.

Possible values:FullWidth, Small, Medium, Large

OnScreenKeyboardSizeOnScreenKeyboardSize.Medium
KeyLayout

Gets or sets the default key arrangement inside keyboard rows.

Possible values:Stretch, Centered

OnScreenKeyboardKeyLayoutOnScreenKeyboardKeyLayout.Centered
KeyMinHeight

Gets or sets the key minimum height, in pixels.

int?null
KeyWidth

Gets or sets the base key width, in pixels, used by centered key layout.

int?null
Placement

Gets or sets the default keyboard placement.

Possible values:Bottom, Top, Inline

OnScreenKeyboardPlacementOnScreenKeyboardPlacement.Bottom
ShowMode

Gets or sets how the on-screen keyboard is shown for enabled input components.

Possible values:Default, Focus, Manual

OnScreenKeyboardShowModeOnScreenKeyboardShowMode.Focus
ShowSpecialCharactersKey

If true, the text keyboard includes a key that toggles special characters.

boolfalse
SpecialCharactersRows

Gets or sets the rows used when the special characters keyboard is active.

IReadOnlyList<IReadOnlyList<OnScreenKeyboardKey>>null

Events

OnScreenKeyboardProvider

Event Description Type
LayoutProvider

Gets or sets a function that resolves keyboard rows for the active input context.

Func<OnScreenKeyboardContext, IReadOnlyList<IReadOnlyList<OnScreenKeyboardKey>>>

BaseOnScreenKeyboardInputComponent

Event Description Type
Blur

The blur event fires when an element has lost focus.

EventCallback<FocusEventArgs>
CustomValidationValue

Used to provide custom validation value on which the validation will be processed with the Validator handler.

Remarks

Should be used carefully as it's only meant for some special cases when input is used in a wrapper component, like Autocomplete or SelectList.

Func<TValue>
FocusIn

Notifies when the input box gains focus.

EventCallback<FocusEventArgs>
FocusOut

Notifies when the input box loses focus.

EventCallback<FocusEventArgs>
KeyDown

Notifies when a key is pressed down while the control has focus.

EventCallback<KeyboardEventArgs>
KeyPress

Notifies when a key is pressed while the control has focus.

EventCallback<KeyboardEventArgs>
KeyUp

Notifies when a key is released while the control has focus.

EventCallback<KeyboardEventArgs>
OnFocus

Notifies when the input box gains or loses focus.

EventCallback<FocusEventArgs>
ValueChanged

Occurs after value has changed.

EventCallback<TValue>

BlazoriseOnScreenKeyboardOptions

Event Description Type
LayoutProvider

Gets or sets a function that resolves keyboard rows for a focused input.

Func<OnScreenKeyboardContext, IReadOnlyList<IReadOnlyList<OnScreenKeyboardKey>>>
LayoutSelector

Gets or sets a function that resolves the keyboard layout for a focused input.

Func<OnScreenKeyboardContext, OnScreenKeyboardLayout>
ShouldShow

Gets or sets a predicate that decides if the keyboard should be shown for a focused input.

Func<OnScreenKeyboardContext, bool>

Methods

BaseOnScreenKeyboardInputComponent

Method DescriptionReturnParameters
ShowOnScreenKeyboard Shows the on-screen keyboard for this input. Taskbool focus
Focus Sets the focus on the underline element. Taskbool scrollToElement
Revalidate Forces the Validation (if any is used) to re-validate with the new custom or internal value. Task
On this page