# Input: HextaUI and shadcn/ui

> The HextaUI Input keeps the shadcn/ui names and theme tokens and installs with the same CLI. This page lists what differs, read from the source of both. The shadcn/ui side is its base-vega registry as of 2026-10-26.

Canonical: https://hextaui.com/compare/shadcn-ui/input
Last updated: 2026-10-27

## At a glance

| Measure | HextaUI | shadcn/ui |
| --- | --- | --- |
| Exported parts | 2 | 1 |
| Props the wrapper handles | 8 | 1 |
| Lines of source | 185 | 19 |
| npm dependencies | `@base-ui/react@^1.8.0` `class-variance-authority` `cn` | `cn` |
| Built from | `motion` `number-flow` `theme` `use-autosize` `use-composed-ref` `use-invalid-shake` `use-merged-ref` | – |

More source is not better on its own. Most of the extra lines in HextaUI handle states, motion and edge cases that you would otherwise write yourself.

## Parts

Only in HextaUI `InputCount`

In both `Input`

## Props HextaUI adds

Props the HextaUI wrapper handles itself that the shadcn/ui wrapper does not. Props passed straight through to Base UI or the underlying library are left out, because both versions accept them.

| Prop | What it does |
| --- | --- |
| `htmlSize` Input | The native size attribute, renamed because size is the variant. |
| `shake` Input | Shake once when a form submit finds this input invalid. Works with native validation, Base UI Field and libraries that set aria-invalid. Skipped under reduced motion. |
| `threshold` InputCount | [See the API reference](https://hextaui.com/docs/input#api-reference) |
| `announcement` InputCount | [See the API reference](https://hextaui.com/docs/input#api-reference) |

## Variants

| Prop | In both | Only HextaUI | Only shadcn/ui |
| --- | --- | --- | --- |
| `size` Input | – | `sm` `default` `lg` | – |

## The HextaUI version

Every state, the keyboard map and the API reference are on the [component page](https://hextaui.com/docs/input).

13 of its examples also have a page of their own.

## Switch one component

Run the add command with `--overwrite` to replace the shadcn/ui file in `@/components/ui`, then review the diff in git before you keep it. Imports stay the same, and components you don’t replace keep working.

```bash
npx shadcn@latest add https://hextaui.com/r/input.json --overwrite
```

- Every prop in the table above is an addition, so call sites written for shadcn/ui don’t pass it yet.
- Check any part or variant listed only for shadcn/ui before you switch, and map it to the closest HextaUI one.

## Other components compared

- [Accordion](https://hextaui.com/compare/shadcn-ui/accordion)
- [Alert](https://hextaui.com/compare/shadcn-ui/alert)
- [Alert dialog](https://hextaui.com/compare/shadcn-ui/alert-dialog)
- [Avatar](https://hextaui.com/compare/shadcn-ui/avatar)
- [Badge](https://hextaui.com/compare/shadcn-ui/badge)
- [Bubble](https://hextaui.com/compare/shadcn-ui/bubble)
- [Button](https://hextaui.com/compare/shadcn-ui/button)
- [Card](https://hextaui.com/compare/shadcn-ui/card)
- [Carousel](https://hextaui.com/compare/shadcn-ui/carousel)
- [Chart](https://hextaui.com/compare/shadcn-ui/chart)
- [Combobox](https://hextaui.com/compare/shadcn-ui/combobox)
- [Command](https://hextaui.com/compare/shadcn-ui/command)
- [Dialog](https://hextaui.com/compare/shadcn-ui/dialog)
- [Dropdown menu](https://hextaui.com/compare/shadcn-ui/dropdown-menu)
- [Empty](https://hextaui.com/compare/shadcn-ui/empty)
- [Field](https://hextaui.com/compare/shadcn-ui/field)
- [Hover card](https://hextaui.com/compare/shadcn-ui/hover-card)
- [Input group](https://hextaui.com/compare/shadcn-ui/input-group)
- [Input OTP](https://hextaui.com/compare/shadcn-ui/input-otp)
- [Item](https://hextaui.com/compare/shadcn-ui/item)
- [Kbd](https://hextaui.com/compare/shadcn-ui/kbd)
- [Message scroller](https://hextaui.com/compare/shadcn-ui/message-scroller)
- [Pagination](https://hextaui.com/compare/shadcn-ui/pagination)
- [Popover](https://hextaui.com/compare/shadcn-ui/popover)
- [Progress](https://hextaui.com/compare/shadcn-ui/progress)
- [Questionnaire](https://hextaui.com/compare/shadcn-ui/questionnaire)
- [Radio group](https://hextaui.com/compare/shadcn-ui/radio-group)
- [Scroll area](https://hextaui.com/compare/shadcn-ui/scroll-area)
- [Sheet](https://hextaui.com/compare/shadcn-ui/sheet)
- [Sidebar](https://hextaui.com/compare/shadcn-ui/sidebar)
- [Skeleton](https://hextaui.com/compare/shadcn-ui/skeleton)
- [Slider](https://hextaui.com/compare/shadcn-ui/slider)
- [Spinner](https://hextaui.com/compare/shadcn-ui/spinner)
- [Switch](https://hextaui.com/compare/shadcn-ui/switch)
- [Table](https://hextaui.com/compare/shadcn-ui/table)
- [Textarea](https://hextaui.com/compare/shadcn-ui/textarea)
- [Tooltip](https://hextaui.com/compare/shadcn-ui/tooltip)

## More comparisons

- [All comparisons](https://hextaui.com/compare)
- [HextaUI vs AI Elements](https://hextaui.com/compare/ai-elements)
- [HextaUI vs assistant-ui](https://hextaui.com/compare/assistant-ui)
- [HextaUI vs prompt-kit](https://hextaui.com/compare/prompt-kit)
- [shadcn AI chat templates](https://hextaui.com/compare/shadcn-ai-chat-templates)

## Related

- [Input](https://hextaui.com/docs/input) - A text input with three sizes, invalid and read-only states, native validation styling and a 16px touch font so phones never zoom in.
- [Motion](https://hextaui.com/docs/motion) - The easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- [Number flow](https://hextaui.com/docs/number-flow) - Animated numbers where only the changed digits spin, with any Intl format and locale.
- [useAutosize](https://hextaui.com/docs/use-autosize) - Grows a textarea with what you write between its minimum and maximum height, animating each change without ever touching the text.
- [useComposedRef](https://hextaui.com/docs/use-composed-ref) - Keeps a ref to your own element while still forwarding it to whatever ref the parent passed in.
- [useInvalidShake](https://hextaui.com/docs/use-invalid-shake) - Shakes a form control when a submit attempt finds it invalid, and never while someone is still typing.
- [useMergedRef](https://hextaui.com/docs/use-merged-ref) - Combines any number of callback and object refs into one, with React 19 ref cleanup for each of them.
