Input Group
Add addons, buttons, and helper content to inputs.
Installation
pnpm add @heyramzi/uiUsage
import * as InputGroup from "@heyramzi/ui/shadcn/input-group";<InputGroup.Root>
<InputGroup.Addon>
<InputGroup.Text>https://</InputGroup.Text>
</InputGroup.Addon>
<InputGroup.Input placeholder="example.com" />
</InputGroup.Root>API reference
InputGroup.Root
refbindableHTMLDivElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLDivElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLDivElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLDivElement> from svelte/elements | |
InputGroup.Input
refbindableInput- Default
null valuebindableInputclassstring...rest- Every prop of
Input
| Prop | Type | Default |
|---|---|---|
ref bindable | Input | null |
value bindable | Input | |
class | string | |
...rest | Every prop of Input | |
InputGroup.Addon
align"inline-start" | "inline-end" | "block-start" | "block-end"- Default
"inline-start" refbindableHTMLDivElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLDivElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
align | "inline-start" | "inline-end" | "block-start" | "block-end" | "inline-start" |
ref bindable | HTMLDivElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLDivElement> from svelte/elements | |
InputGroup.Button
size"xs" | "sm" | "icon-xs" | "icon-sm"- Default
"xs" refbindableButton- Default
null classstringchildrenSnippettype"button" | "submit" | "reset"- Default
"button" variantstring- Default
"ghost" ...rest- Every prop of
Buttonexcepthref, size
| Prop | Type | Default |
|---|---|---|
size | "xs" | "sm" | "icon-xs" | "icon-sm" | "xs" |
ref bindable | Button | null |
class | string | |
children | Snippet | |
type | "button" | "submit" | "reset" | "button" |
variant | string | "ghost" |
...rest | Every prop of Button except href, size | |
InputGroup.Text
refbindableHTMLSpanElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLSpanElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLSpanElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLSpanElement> from svelte/elements | |
InputGroup.Textarea
refbindableTextarea- Default
null valuebindableTextareaclassstring...rest- Every prop of
Textarea
| Prop | Type | Default |
|---|---|---|
ref bindable | Textarea | null |
value bindable | Textarea | |
class | string | |
...rest | Every prop of Textarea | |