Loading dashboard...
Loading dashboard...
import {
InputGroup,
InputGroupAddon,
InputGroupButton,
InputGroupInput,
InputGroupText,
InputGroupTextarea,
} from "@/components/ui/input-group"<InputGroup>
<InputGroupInput placeholder="Search..." />
<InputGroupAddon>
<SearchIcon />
</InputGroupAddon>
</InputGroup>Use the align prop on InputGroupAddon to position the addon relative to the input.
For proper focus management, InputGroupAddon should always be placed after
InputGroupInput or InputGroupTextarea in the DOM. Use the align prop to
visually position the addon.
Use align="inline-start" to position the addon at the start of the input. This is the default.
Icon positioned at the start.
Use align="inline-end" to position the addon at the end of the input.
Icon positioned at the end.
Use align="block-start" to position the addon above the input.
Header positioned above the input.
Header positioned above the textarea.
Use align="block-end" to position the addon below the input.
Footer positioned below the input.
Footer positioned below the textarea.
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.
The main component that wraps inputs and addons.
<InputGroup>
<InputGroupInput />
<InputGroupAddon />
</InputGroup>Displays icons, text, buttons, or other content alongside inputs.
For proper focus navigation, the InputGroupAddon component should be placed
after the input. Set the align prop to position the addon.
<InputGroupAddon align="inline-end">
<SearchIcon />
</InputGroupAddon>For <InputGroupInput />, use the inline-start or inline-end alignment. For <InputGroupTextarea />, use the block-start or block-end alignment.
The InputGroupAddon component can have multiple InputGroupButton components and icons.
<InputGroupAddon>
<InputGroupButton>Button</InputGroupButton>
<InputGroupButton>Button</InputGroupButton>
</InputGroupAddon>Displays buttons within input groups.
<InputGroupButton>Button</InputGroupButton>
<InputGroupButton size="icon-xs" aria-label="Copy">
<CopyIcon />
</InputGroupButton>Replacement for <Input /> when building input groups. This component has the input group styles pre-applied and uses the unified data-slot="input-group-control" for focus state handling.
All other props are passed through to the underlying <Input /> component.
<InputGroup>
<InputGroupInput placeholder="Enter text..." />
<InputGroupAddon>
<SearchIcon />
</InputGroupAddon>
</InputGroup>Replacement for <Textarea /> when building input groups. This component has the textarea group styles pre-applied and uses the unified data-slot="input-group-control" for focus state handling.
All other props are passed through to the underlying <Textarea /> component.
<InputGroup>
<InputGroupTextarea placeholder="Enter message..." />
<InputGroupAddon align="block-end">
<InputGroupButton>Send</InputGroupButton>
</InputGroupAddon>
</InputGroup>InputGroupAdd the min-w-0 class to the InputGroup component. See diff.
import {
InputGroup,
InputGroupAddon,import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"
import {
InputGroup,import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"
import {
InputGroup,import {
Field,
FieldDescription,import {
Field,
FieldDescription,import {
InputGroup,
InputGroupAddon,"use client"
import * as React from "react"import {
InputGroup,
InputGroupAddon,import {
InputGroup,
InputGroupAddon,import {
DropdownMenu,
DropdownMenuContent,import {
InputGroup,
InputGroupAddon,"use client"
import {import {
InputGroup,
InputGroupAddon,