Skip to content
GitHub11 stars

Add addons, buttons, and helper content to inputs.

12 results
<InputGroup Class="max-w-xs">
    <InputGroupInput placeholder="Search..." />
    <InputGroupAddon><Icon Data="LucideIcons.Search" /></InputGroupAddon>
    <InputGroupAddon Align="InputGroupAddonAlign.InlineEnd">12 results</InputGroupAddon>
</InputGroup>

Installation

dnx Blazix.Cli add input-group

Usage

<InputGroup>
    <InputGroupInput placeholder="Search..." />
    <InputGroupAddon><Icon Data="LucideIcons.Search" /></InputGroupAddon>
</InputGroup>

Composition

Use the following composition to build an InputGroup:

InputGroup
├── InputGroupInput or InputGroupTextarea
├── InputGroupAddon
├── InputGroupButton
└── InputGroupText

Align

Use the Align parameter on InputGroupAddon to position the addon relative to the input.

inline-start

Use align="inline-start" to position the addon at the start of the input. This is the default.

Icon positioned at the start.

<Field Class="max-w-sm">
    <FieldLabel for="inline-start-input">Input</FieldLabel>
    <InputGroup>

inline-end

Use align="inline-end" to position the addon at the end of the input.

Icon positioned at the end.

<Field Class="max-w-sm">
    <FieldLabel for="inline-end-input">Input</FieldLabel>
    <InputGroup>
        <InputGroupInput id="inline-end-input" Type="password" placeholder="Enter password" />
        <InputGroupAddon Align="InputGroupAddonAlign.InlineEnd"><Icon Data="LucideIcons.EyeOff" /></InputGroupAddon>
    </InputGroup>
    <FieldDescription>Icon positioned at the end.</FieldDescription>
</Field>

block-start

Use align="block-start" to position the addon above the input.

Full Name

Header positioned above the input.

script.js

Header positioned above the textarea.

<FieldGroup Class="max-w-sm">
    <Field>
        <FieldLabel for="block-start-input">Input</FieldLabel>

block-end

Use align="block-end" to position the addon below the input.

USD

Footer positioned below the input.

0/280

Footer positioned below the textarea.

<FieldGroup Class="max-w-sm">
    <Field>
        <FieldLabel for="block-end-input">Input</FieldLabel>

Icon

<div class="grid w-full max-w-sm gap-6">
    <InputGroup>
        <InputGroupInput placeholder="Search..." />

Text

$
USD
https://
.com
@company.com
120 characters left
<div class="grid w-full max-w-sm gap-6">
    <InputGroup>
        <InputGroupAddon><InputGroupText>$</InputGroupText></InputGroupAddon>

Button

https://
@inject IJSRuntime JsRuntime

<div class="grid w-full max-w-sm gap-6">

Kbd

⌘K
<InputGroup Class="max-w-sm">
    <InputGroupInput placeholder="Search..." />
    <InputGroupAddon><Icon Data="LucideIcons.Search" class="text-muted-foreground" /></InputGroupAddon>
    <InputGroupAddon Align="InputGroupAddonAlign.InlineEnd"><Kbd>⌘K</Kbd></InputGroupAddon>
</InputGroup>
<div class="grid w-full max-w-sm gap-4">
    <InputGroup>
        <InputGroupInput placeholder="Enter file name" />

Spinner

Saving...
Please wait...
<div class="grid w-full max-w-sm gap-4">
    <InputGroup>
        <InputGroupInput placeholder="Searching..." />

Textarea

Line 1, Column 1
script.js
<div class="grid w-full max-w-md gap-4">
    <InputGroup>
        <InputGroupTextarea id="textarea-code-32" placeholder="console.log('Hello, world!');" Class="min-h-[200px]" />

Custom Input

Add the data-slot="input-group-control" attribute to your custom input for automatic focus state handling.

Here's an example of a custom resizable textarea from a third-party library.

<div class="grid w-full max-w-sm gap-6">
    <InputGroup>
        <textarea data-slot="input-group-control"

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

١٢ نتيجة
جاري الحفظ...
٠/٢٨٠

تذييل موضع أسفل منطقة النص.

<div class="grid w-full max-w-sm gap-6">
    <InputGroup Class="max-w-xs">
        <InputGroupInput placeholder="@T.Placeholder" aria-label="@T.Placeholder" />

API Reference

InputGroup

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

InputGroupAddon

ParameterTypeDefault
Align InputGroupAddonAlign InputGroupAddonAlign.InlineStart
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

InputGroupButton

ParameterTypeDefault
Type ButtonType ButtonType.Button
Variant ButtonVariant ButtonVariant.Ghost
Size InputGroupButtonSize InputGroupButtonSize.Xs
Disabled bool false
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

InputGroupInput

ParameterTypeDefault
Type string? -
Value string? -
ValueChanged EventCallback<string?> -
Disabled bool false
Class string? -

Other attributes are passed to the element it renders.

InputGroupText

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.

InputGroupTextarea

ParameterTypeDefault
Value string? -
ValueChanged EventCallback<string?> -
Class string? -

Other attributes are passed to the element it renders.

Changelog

2026-11-25 InputGroupButton type

InputGroupButton's Type is now a ButtonType enum, like Button's: ButtonType.Button (the default), ButtonType.Submit, or ButtonType.Reset. Re-add it with dnx Blazix.Cli add input-group --overwrite.