Input
A multi-functional input component.
Basic Usage
Basic input component with Signal model binding.
Value:
<prism-input [(value)]="name" placeholder="Enter your name" />Sizes
Input comes in three sizes: sm, md, and lg.
<prism-input size="sm" placeholder="Small size" />
<prism-input size="md" placeholder="Medium size" />
<prism-input size="lg" placeholder="Large size" />Icons
Add prefix or suffix icons using Remix Icon names.
<prism-input prefix="user-line" placeholder="Username" />
<prism-input suffix="search-line" placeholder="Search..." />Validation States
Different states like error, success, and disabled.
<prism-input [error]="true" placeholder="Error state" />
<prism-input [success]="true" placeholder="Success state" />
<prism-input [disabled]="true" placeholder="Disabled input" />PrismInput API
| Name | Type | Default | Description |
|---|---|---|---|
value | model<string> | '' | Two-way bound value of the input. |
type | input<string> | 'text' | HTML input type. |
placeholder | input<string> | '' | Placeholder text. |
disabled | model<boolean> | false | Whether the input is disabled. |
readonly | input<boolean> | false | Whether the input is read-only. |
size | input<'sm' | 'md' | 'lg'> | 'md' | Size of the input. |
error | input<boolean> | false | Error validation status. |
success | input<boolean> | false | Success validation status. |
prefix | input<string | TemplateRef> | null | Icon name or template for prefix. |
suffix | input<string | TemplateRef> | null | Icon name or template for suffix. |