Input Group

A flexible input group that combines inputs with addons, prefixes, and suffixes to improve usability.

12 results

Installation

ng g @spartan-ng/cli:ui input-group

Usage

import { HlmInputGroupImports } from '@spartan-ng/helm/input-group';
<hlm-input-group>
  <input hlmInputGroupInput placeholder="Search..." />
  <hlm-input-group-addon>
    <ng-icon name="lucideSearch" />
  </hlm-input-group-addon>
</hlm-input-group>

Examples

Icon

Text

$USDhttps://.com@company.com120 characters left

Button

https://

Kbd

⌘K

Spinner

Saving...Please wait...

Textarea

Input groups also work with textarea components. Use block-start or block-end for alignment.

Line 1, Column 1 script.js

Tooltip

Add tooltips to provide additional context or help.

Label

Add labels within input groups to improve accessibility.

Button Group

Wrap input groups with button groups to create prefixes and suffixes.

.com

Custom Input

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

No style is applied to the custom input. Apply your own styles using the class prop.

Form

RTL

To enable RTL support in spartan-ng, see the RTL configuration guide.

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

Helm API

HlmInputGroupAddon

Selector: [hlmInputGroupAddon],hlm-input-group-addon

ExportAs: hlmInputGroupAddon

Inputs

PropTypeDefaultDescription
align InputGroupAddonVariants['align'] 'inline-start' -

HlmInputGroupButton

Selector: button[hlmInputGroupButton]

ExportAs: hlmInputGroupButton

Inputs

PropTypeDefaultDescription
size InputGroupAddonVariants['size'] 'xs' -
type 'button' | 'submit' | 'reset' 'button' -
variant ButtonVariants['variant'] this._config.variant -

HlmInputGroupInput

Selector: input[hlmInputGroupInput]

ExportAs: hlmInputGroupInput

HlmInputGroupText

Selector: [hlmInputGroupText],hlm-input-group-text

ExportAs: hlmInputGroupText

HlmInputGroupTextarea

Selector: textarea[hlmInputGroupTextarea]

ExportAs: hlmInputGroupTextarea

HlmInputGroup

Selector: [hlmInputGroup],hlm-input-group

ExportAs: hlmInputGroup

Input OTP Hover Card