# Changelog (/docs/changelog)
## July 2026 - Base UI [#july-2026---base-ui]
ui-x is now built on [Base UI](https://base-ui.com). Following shadcn/ui's adoption of Base UI as the modern successor to Radix UI, every component has been rebuilt on Base UI primitives and restyled to match the latest shadcn/ui design.
### What's changed [#whats-changed]
* **Base UI everywhere** β All Radix UI dependencies are gone. Components are built on Base UI primitives and utilities, with React 19 ref handling throughout.
* **Restyled** β Every component, demo and docs page has been refreshed against the latest shadcn/ui styling.
* **Simpler forms** β Demos use Base UI's `Field` and `Form` for form plumbing. For React Hook Form or TanStack Form wiring, see the shadcn/ui [forms guides](https://ui.shadcn.com/docs/forms).
* **Dropzone composes with Empty** β `DropzoneGroup`, `DropzoneTitle` and `DropzoneDescription` are gone. Build the zone's title and description with shadcn/ui's [Empty](https://ui.shadcn.com/docs/components/empty) component instead; `DropzoneUploadIcon` stays for the drag-state icon swap.
### Superseded components [#superseded-components]
shadcn/ui now ships first-class versions of several components that ui-x originally existed to fill in. These have been removed in favor of the official ones:
| ui-x component | Use instead |
| -------------- | -------------------------------------------------------------------- |
| Calendar | [Calendar](https://ui.shadcn.com/docs/components/calendar) |
| Combobox | [Combobox](https://ui.shadcn.com/docs/components/combobox) |
| Control Group | [Button Group](https://ui.shadcn.com/docs/components/button-group) |
| File List | [Attachment](https://ui.shadcn.com/docs/components/attachment) |
| Input Base | [Input Group](https://ui.shadcn.com/docs/components/input-group) |
| Kbd | [Kbd](https://ui.shadcn.com/docs/components/kbd) |
| Native Select | [Native Select](https://ui.shadcn.com/docs/components/native-select) |
## June 2025 - Phone Input and Emoji Picker [#june-2025---phone-input-and-emoji-picker]
We've added a new `` component and a new `` component.
### Phone Input [#phone-input]
A component for phone number input field with country selection and formatting. Built on top of [react-phone-number-input](https://github.com/catamphetamine/react-phone-number-input).
[Read the docs](/docs/components/phone-input)
### Emoji Picker [#emoji-picker]
A component that allows users to select an emoji from a list of emojis. Built on top of [frimousse](https://frimousse.liveblocks.io/).
[Read the docs](/docs/components/emoji-picker)
## May 2025 - Tailwind v4 and React 19 [#may-2025---tailwind-v4-and-react-19]
We're excited to announce support for Tailwind v4 and React 19! This major update brings significant improvements and new features to the UI components library. Please refer to shadcn/ui's [Tailwind v4](https://ui.shadcn.com/docs/tailwind-v4) documentation for more details on migrating your project and taking advantage of the new capabilities.
### Wheel Picker [#wheel-picker]
Along with this major update, we've also added a new `` component, built on top of [react-wheel-picker](https://github.com/ncdai/react-wheel-picker). This component provides an iOS-like interface for selecting options from a scrollable wheel.
[Read the docs](/docs/components/wheel-picker)
## February 2025 - Virtualizer [#february-2025---virtualizer]
We've added a new Virtualizer documentation page.
### Virtualizer [#virtualizer]
Learn how to use the `virtua` library to efficiently render large lists and grids by virtualizing your components. This documentation provides practical examples and guidance on integrating `virtua` with your existing components.
[Read the docs](/docs/utilities/virtualized)
## February 2025 - Sortable and Control Group [#february-2025---sortable-and-control-group]
We've added a new `` component and a new `` component.
### Sortable [#sortable]
A drag and drop component for reordering items in a list or grid. `` is built on top of [@dnd-kit](https://dndkit.com)'s [sortable](https://docs.dndkit.com/presets/sortable) preset.
[See more examples](/docs/utilities/sortable)
### Control Group [#control-group]
A component for grouping form controls like text inputs, buttons, selects and other elements into a single cohesive unit. When used together with Input Base, you can create highly customizable and flexible input layouts for a variety of use cases. Control Group has since been superseded by shadcn/ui's [Button Group](https://ui.shadcn.com/docs/components/button-group).
### Thank you [#thank-you]
I'd like to thank everyone who has been using this project, providing feedback and contributing to it. I really appreciate it. Thank you π
# Introduction (/docs)
**Similar to shadcn/ui, this is not a component library, It is how you build your component library.**
junwen-k/ui-x is a thoughtfully crafted extension that provides additional components while maintaining the same principles of being open, composable and customizable.
As junwen-k/ui-x is built as an extension of shadcn/ui, it inherits the core philosophies and approaches. For the foundational concepts, please refer to shadcn/ui's [documentation](https://ui.shadcn.com/docs).
## Philosophy [#philosophy]
The components in this extension are built around four key principles:
* **Intuitive Developer Experience:** Each component's API mirrors Base UI conventions and shadcn/ui patterns, creating an intuitive and familiar experience.
* **Natural Extension:** Components are thoughtfully designed to feel like natural additions to the shadcn/ui ecosystem, maintaining the same level of quality and coherence.
* **Open and Customizable:** Like shadcn/ui, you have full access to the component code, allowing complete customization to fit your needs.
* **AI-Ready:** Components are designed to be compatible with AI tools like [v0](https://v0.dev), enabling seamless integration with AI-powered development workflows.
## Acknowledgments [#acknowledgments]
This project stands on the shoulders of amazing open source projects and many other incredible libraries. Thank you to all the maintainers and contributors who make this extension possible.
## FAQ [#faq]
How does it integrate with shadcn/ui?
The components are designed to work seamlessly with shadcn's design system
and distribution approach. They integrate naturally with your existing
shadcn/ui components while maintaining consistent styling, behavior, and
developer experience.
Why are there additional primitives?
This extension includes additional primitive components for features not
covered by Base UI. By maintaining the separation between primitive logic
and styled components, we ensure cleaner code and better maintainability
while expanding the available functionality.
# Installation (/docs/installation)
junwen-k/ui-x is an extension of [shadcn/ui](https://ui.shadcn.com) and is distributed through the same registry system. Set up shadcn/ui in your project first by following the official [installation guide](https://ui.shadcn.com/docs/installation) for your framework.
## Requirements [#requirements]
* A project set up with [shadcn/ui](https://ui.shadcn.com/docs/installation) (Tailwind CSS v4 and React 19 for the latest components). The Tailwind v3 docs are no longer maintained and remain archived at [v3-ui-x.junwen-k.dev](https://v3-ui-x.junwen-k.dev).
* Components are built on [Base UI](https://base-ui.com) primitives, matching shadcn/ui's Base UI-based components.
## Installing components [#installing-components]
Every component can be installed with the shadcn CLI by pointing at this registry:
```bash
npx shadcn@latest add junwen-k/ui-x/date-field
```
Each component's documentation page includes its exact install command, along with a manual installation option if you prefer to copy the source directly.
## Utilities [#utilities]
Utility docs such as [Sortable](/docs/utilities/sortable) and [Virtualized](/docs/utilities/virtualized) are guides built around third-party libraries β their pages describe which packages to install.
# Badge Group (/docs/components/badge-group)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/badge-group
```
Install the following dependencies:
```bash
npm install @base-ui/react @base-ui/utils
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import { BadgeGroup, BadgeGroupItem } from "@/components/ui/badge-group";
```
```tsx
ChocolateMintStrawberryVanilla
```
## Examples [#examples]
### Default [#default]
### Form [#form]
## Accessibility [#accessibility]
The group is built on [Base UI Toggle Group](https://base-ui.com/react/components/toggle-group): one item is tabbable at a time, the arrow keys move focus between items, and Space or Enter toggles the focused item. When removal is enabled, Backspace and Delete remove the focused item β the close icon is a pointer-only affordance hidden from assistive technology, so keyboard and screen-reader users are not dependent on it.
## API Reference [#api-reference]
### BadgeGroup [#badgegroup]
The group container. Renders a [Base UI Toggle Group](https://base-ui.com/react/components/toggle-group).
| Prop | Type | Default | Description |
| --------------- | ------------------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `type` | `"single" \| "multiple"` | `"single"` | Whether one or several items can be pressed at a time. Determines the value type below. |
| `value` | `string \| string[]` | - | The pressed item(s), typed by `type`. Use for controlled value. |
| `defaultValue` | `string \| string[]` | - | The initial value when uncontrolled. |
| `onValueChange` | `(value) => void` | - | Called when the pressed item(s) change. The value is typed by `type`. |
| `onRemove` | `(value) => void` | - | Enables removal. Called with the removed value(s) when an item's close icon is clicked or Backspace / Delete is pressed. |
| `...props` | `ToggleGroup.Props` | - | Remaining props are spread to [Base UI Toggle Group](https://base-ui.com/react/components/toggle-group#api-reference). |
### BadgeGroupItem [#badgegroupitem]
A single badge. Renders a [Base UI Toggle](https://base-ui.com/react/components/toggle) styled as an outline [Badge](https://ui.shadcn.com/docs/components/badge). Shows a close icon when the group has `onRemove`.
| Prop | Type | Default | Description |
| ---------- | -------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| `value` | `string` | - | The item's value within the group. Required. |
| `...props` | `Toggle.Props` | - | Remaining props are spread to [Base UI Toggle](https://base-ui.com/react/components/toggle#api-reference). |
# Confirmer (/docs/components/confirmer)
## About [#about]
The `` component is built on top of [react-call](https://react-call.desko.dev/).
## Installation [#installation]
CLI
Manual
Run the following command:
```bash
npx shadcn@latest add junwen-k/ui-x/confirmer
```
Add the `` component.
```tsx title="app/layout.tsx" showLineNumbers {1,9}
import { Confirmer } from "@/components/ui/confirmer";
export default function RootLayout({ children }) {
return (
{children}
);
}
```
Install the following dependencies:
```bash
npm install react-call
```
Add the `` and `` component to your project.
The `` component uses `` and `` components. Make sure you have it installed in your project.
See installation instructions for the [AlertDialog](https://ui.shadcn.com/docs/components/alert-dialog) and the [Button](https://ui.shadcn.com/docs/components/button) components.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
Add the `` component.
```tsx title="app/layout.tsx" showLineNumbers {1,9}
import { Confirmer } from "@/components/ui/confirmer";
export default function RootLayout({ children }) {
return (
{children}
);
}
```
## Usage [#usage]
```tsx
import { confirm } from "@/components/ui/confirmer";
```
```tsx
confirm({
title: "Are you absolutely sure?",
description:
"This action cannot be undone. This will permanently delete your account and remove your data from our servers.",
}).then((confirmed) => {
// ...
});
```
## Examples [#examples]
### Default [#default]
## Accessibility [#accessibility]
`` renders an ``, so it inherits Base UI's alert dialog semantics: the dialog traps focus while open, labels itself from `` and `` (the `title` and `description` options), and returns focus to the triggering element when it closes.
Pressing Escape or activating the cancel button resolves `confirm()` with `false`, mirroring a dismissed dialog. Always pass a `title` (and a `description` for anything non-obvious) so screen reader users hear what they're confirming, and set `ActionProps={{ variant: "destructive" }}` rather than color alone to distinguish destructive actions.
## API Reference [#api-reference]
### Confirmer [#confirmer]
The dialog host. Render it once near the root of your app; it renders nothing until `confirm` is called. Takes no props.
### confirm [#confirm]
Opens the confirm dialog imperatively and resolves with the user's choice β `true` for the action button, `false` for cancel or dismissing the dialog.
```tsx
function confirm(options?: ConfirmOptions): Promise;
```
| Option | Type | Default | Description |
| ------------- | ------------------------------------------------ | ----------------- | --------------------------------------------------------------------------------------------------- |
| `title` | `ReactNode` | `"Are you sure?"` | The dialog title. |
| `description` | `ReactNode` | - | The dialog description. |
| `cancelText` | `ReactNode` | `"Cancel"` | The cancel button label. |
| `actionText` | `ReactNode` | `"Continue"` | The action button label. |
| `CancelProps` | `React.ComponentProps` | - | Props spread to the cancel button. |
| `ActionProps` | `React.ComponentProps` | - | Props spread to the action button, e.g. `{ variant: "destructive" }` for destructive confirmations. |
# Date Field (/docs/components/date-field)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/date-field
```
Add `` component to your project.
The `` component uses the `` component. Make sure you have it installed in your project.
See installation instructions for the [DateTimeField](/docs/components/date-time-field#installation) component.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
DateField,
DateFieldDays,
DateFieldMonths,
DateFieldSeparator,
DateFieldYears,
} from "@/components/ui/date-field";
```
```tsx
```
## Examples [#examples]
### Default [#default]
### Form [#form]
## Accessibility [#accessibility]
The field follows the segment keyboard model and labeling guidance described in the [Date Time Field accessibility](/docs/components/date-time-field#accessibility) section.
## API Reference [#api-reference]
A date-only preset of the [Date Time Field](/docs/components/date-time-field#api-reference) β each part wraps its Date Time Field counterpart and accepts the same props.
### DateField [#datefield]
Wraps `DateTimeField` and accepts all of the [Root props](/docs/primitives/date-time-field#root) (`value`, `onValueChange`, `minDate`, `maxDate`, β¦).
### DateFieldDays, DateFieldMonths, DateFieldYears [#datefielddays-datefieldmonths-datefieldyears]
Wrap the corresponding [segments](/docs/primitives/date-time-field#segments) with their default placeholders (`dd`, `mm`, `yyyy`).
### DateFieldSeparator [#datefieldseparator]
Wraps the [separator](/docs/components/date-time-field#datetimefieldseparator) with `/` as the default children.
# Date Picker (/docs/components/date-picker)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/date-picker
```
Add the ``, ``, ``, `` and `` component to your project.
The `` component uses ``, ``, ``, `` and `` components. Make sure you have it installed in your project.
See installation instructions for the [Button](https://ui.shadcn.com/docs/components/button), [Calendar](https://ui.shadcn.com/docs/components/calendar), [DateField](/docs/components/date-field#installation), [DatePickerPrimitive](/docs/primitives/date-picker#installation) and the [Input Group](https://ui.shadcn.com/docs/components/input-group) components.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Examples [#examples]
### Date Picker [#date-picker]
### Input [#input]
### Form [#form]
## Accessibility [#accessibility]
### Labeling [#labeling]
The trigger and clear buttons in the input variant are icon-only. `` ships a visually hidden "Clear date" label for the clear button; when composing your own icon-only triggers, give them an accessible name with `aria-label` or a visually hidden ``.
### Keyboard interactions [#keyboard-interactions]
The inline date field follows the segment keyboard model described in the [Date Time Field accessibility](/docs/components/date-time-field#accessibility) section. Inside the popover, the calendar supports the arrow keys to move between days, PageUp / PageDown to change months and Enter to select. Escape closes the popover and returns focus to the trigger.
## API Reference [#api-reference]
Styled wrappers around the [Date Picker primitive](/docs/primitives/date-picker#api-reference). Each part forwards its props to the primitive part it wraps β see the primitive page for the full prop tables.
### DatePicker [#datepicker]
Wraps [Root](/docs/primitives/date-picker#root) and accepts all of its props (`mode`, `value`, `onValueChange`, `formatStr`, `month`, `required`, `disabled`, β¦).
### DatePickerTrigger [#datepickertrigger]
Wraps [Trigger](/docs/primitives/date-picker#trigger), rendered as an outline `` with a calendar icon.
### DatePickerValue [#datepickervalue]
Wraps [Value](/docs/primitives/date-picker#value), muting the placeholder text. Accepts `placeholder`.
### DatePickerInput [#datepickerinput]
An [Input Group](https://ui.shadcn.com/docs/components/input-group) containing the inline date field plus clear and open buttons. Renders a single-date field or a range field automatically based on the root's `mode`; the inline field is not supported in `"multiple"` mode. Accepts the corresponding [DateField / DateRangeField props](/docs/primitives/date-picker#datefield).
### DatePickerAnchor [#datepickeranchor]
Wraps [Anchor](/docs/primitives/date-picker#anchor) for positioning the popover against a custom element.
### DatePickerContent [#datepickercontent]
Wraps [Portal, Positioner and Content](/docs/primitives/date-picker#portal-positioner-content) with popover styling, and lifts the common positioning props.
| Prop | Type | Default | Description |
| ------------- | ---------------------------------------- | ---------- | ------------------------------------------- |
| `align` | `"start" \| "center" \| "end"` | `"start"` | Alignment against the anchor. |
| `alignOffset` | `number` | `4` | Offset along the alignment axis. |
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"bottom"` | Side of the anchor to render against. |
| `sideOffset` | `number` | `0` | Distance from the anchor. |
| `...props` | `Content props` | - | Remaining props spread to the content part. |
### DatePickerCalendar [#datepickercalendar]
Wraps [Calendar](/docs/primitives/date-picker#calendar), rendering the styled [Calendar](https://ui.shadcn.com/docs/components/calendar) component. Accepts the styled calendar's props.
# Date Time Field (/docs/components/date-time-field)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/date-time-field
```
Add `` and `` component to your project.
The `` component uses `` and `` components. Make sure you have it installed in your project.
See installation instructions for the [DateTimeFieldPrimitive](/docs/primitives/date-time-field#installation) and [Input Group](https://ui.shadcn.com/docs/components/input-group) components.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
DateTimeField,
DateTimeFieldAmPm,
DateTimeFieldDays,
DateTimeFieldHours,
DateTimeFieldMinutes,
DateTimeFieldMonths,
DateTimeFieldSeconds,
DateTimeFieldSeparator,
DateTimeFieldYears,
} from "@/components/ui/date-time-field";
```
```tsx
//Β·::
```
## Examples [#examples]
### Default [#default]
### Form [#form]
## Accessibility [#accessibility]
### Labeling [#labeling]
Each segment is an individual ``, so the field needs a group label: associate a visible label with the field (for example via `` and `` in forms), or label the group with `aria-labelledby`. Separators are decorative and hidden from assistive technology with `aria-hidden`.
### Keyboard interactions [#keyboard-interactions]
| Key | Description |
| ------------------------------------------ | -------------------------------------------------------------------- |
| ArrowLeftArrowRight | Moves focus to the previous / next segment. |
| ArrowUpArrowDown | Increments / decrements the focused segment. |
| 0β9 | Types a value into the segment, advancing to the next when complete. |
| AP | Sets the meridiem segment to AM / PM. |
| BackspaceDelete | Clears the focused segment. |
## API Reference [#api-reference]
Styled wrappers around the [Date Time Field primitive](/docs/primitives/date-time-field#api-reference) β see the primitive page for the full prop tables.
### DateTimeField [#datetimefield]
Wraps [Root](/docs/primitives/date-time-field#root) and accepts all of its props (`value`, `onValueChange`, `hour12`, `minDate`, `maxDate`, β¦), rendered as an [Input Group](https://ui.shadcn.com/docs/components/input-group).
### DateTimeFieldDays, DateTimeFieldMonths, DateTimeFieldYears, DateTimeFieldHours, DateTimeFieldMinutes, DateTimeFieldSeconds [#datetimefielddays-datetimefieldmonths-datetimefieldyears-datetimefieldhours-datetimefieldminutes-datetimefieldseconds]
Wrap the corresponding [segments](/docs/primitives/date-time-field#segments) with input styling and default placeholders (`dd`, `mm`, `yyyy` and `--` for the time segments).
### DateTimeFieldAmPm [#datetimefieldampm]
Wraps [AmPm](/docs/primitives/date-time-field#ampm); renders only when the field has `hour12`.
### DateTimeFieldSeparator [#datetimefieldseparator]
Wraps [Separator](/docs/primitives/date-time-field#separator) with muted styling. Pass the separator character as `children` (e.g. `/` or `:`).
# Date Time Range Field (/docs/components/date-time-range-field)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/date-time-range-field
```
Add ``, `` and `` component to your project.
The `` component uses ``, `` and `` components. Make sure you have it installed in your project.
See installation instructions for the [DateTimeField](/docs/components/date-time-field#installation), [DateTimeRangeFieldPrimitive](/docs/primitives/date-time-range-field#installation), [Input Group](https://ui.shadcn.com/docs/components/input-group) components.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
DateTimeRangeField,
DateTimeRangeFieldAmPm,
DateTimeRangeFieldDays,
DateTimeRangeFieldFrom,
DateTimeRangeFieldHours,
DateTimeRangeFieldMinutes,
DateTimeRangeFieldMonths,
DateTimeRangeFieldSeconds,
DateTimeRangeFieldSeparator,
DateTimeRangeFieldTo,
DateTimeRangeFieldYears,
} from "@/components/ui/date-time-range-field";
```
```tsx
//Β·::-//Β·::
```
## Examples [#examples]
### Default [#default]
### Form [#form]
## Accessibility [#accessibility]
The field follows the segment keyboard model and labeling guidance described in the [Date Time Field accessibility](/docs/components/date-time-field#accessibility) section. Since the range spans two groups of segments, prefer one visible label for the whole field, or label the `From` and `To` groups individually with `aria-label` when they need distinct names.
## API Reference [#api-reference]
Styled wrappers around the [Date Time Range Field primitive](/docs/primitives/date-time-range-field#api-reference) β see the primitive page for the full prop tables.
### DateTimeRangeField [#datetimerangefield]
Wraps [Root](/docs/primitives/date-time-range-field#root) and accepts all of its props (`value`, `onValueChange`, `hour12`, `from`, `to`, β¦), rendered as an [Input Group](https://ui.shadcn.com/docs/components/input-group).
### DateTimeRangeFieldFrom, DateTimeRangeFieldTo [#datetimerangefieldfrom-datetimerangefieldto]
Wrap [From and To](/docs/primitives/date-time-range-field#from-to). Segments must be placed inside one of the two.
### DateTimeRangeFieldDays, DateTimeRangeFieldMonths, DateTimeRangeFieldYears, DateTimeRangeFieldHours, DateTimeRangeFieldMinutes, DateTimeRangeFieldSeconds [#datetimerangefielddays-datetimerangefieldmonths-datetimerangefieldyears-datetimerangefieldhours-datetimerangefieldminutes-datetimerangefieldseconds]
Wrap the corresponding [segments](/docs/primitives/date-time-range-field#segments), rendered with the [Date Time Field](/docs/components/date-time-field#api-reference) segment styling and placeholders.
### DateTimeRangeFieldAmPm [#datetimerangefieldampm]
Wraps [AmPm](/docs/primitives/date-time-range-field#ampm); renders only when its field has `hour12`.
### DateTimeRangeFieldSeparator [#datetimerangefieldseparator]
Wraps the styled [Date Time Field separator](/docs/components/date-time-field#datetimefieldseparator). Pass the separator character as `children` (e.g. `/`, `:` or `-` between the two fields).
# Description List (/docs/components/description-list)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/description-list
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
DescriptionDetail,
DescriptionGroup,
DescriptionList,
DescriptionTerm,
} from "@/components/ui/description-list";
```
```tsx
Status
Published
Last UpdatedYesterday at 12:34 PMStorage Usage2.4 GB of 5 GBAPI Endpoints4 active endpointsDatabasePostgreSQL v14.5EnvironmentProduction
```
## API Reference [#api-reference]
All parts render semantic HTML description-list elements and accept the corresponding element props.
### DescriptionList [#descriptionlist]
The list container. Renders a `
` element. |
# Dropzone (/docs/components/dropzone)
## About [#about]
The `` component is built on top of [react-dropzone](https://react-dropzone.js.org).
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/dropzone
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Add the `` component to your project.
The `` component uses the `` component for its visual content. Make sure you have it installed in your project.
See installation instructions for the [Empty](https://ui.shadcn.com/docs/components/empty) component.
Add the `` component to your project.
The `` component uses `` component. Make sure you have it installed in your project.
See installation instructions for the [DropzonePrimitive](/docs/primitives/dropzone#installation) component.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
Empty,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/ui/empty";
import {
Dropzone,
DropzoneInput,
DropzoneUploadIcon,
DropzoneZone,
} from "@/components/ui/dropzone";
```
```tsx
Drop files here or click to upload
You can upload files up to 10MB in size. Supported formats: JPG, PNG,
PDF.
```
## Examples [#examples]
### Default [#default]
### Trigger [#trigger]
### Form [#form]
## Accessibility [#accessibility]
The zone is focusable and opens the file dialog with Enter or Space, so the drag-and-drop interaction always has a keyboard equivalent. Make sure the zone contains visible text describing what to upload (such as `` and ``) β the upload icon alone is not an accessible name. Drag states are conveyed with color and iconography via the `` swap; keep the title text meaningful so the state change is not communicated by color alone.
## API Reference [#api-reference]
Styled wrappers around the [Dropzone primitive](/docs/primitives/dropzone#api-reference) β see the primitive page for the full prop tables. The zone's title and description are composed with shadcn/ui's [Empty](https://ui.shadcn.com/docs/components/empty) component rather than a Dropzone-specific part.
### Dropzone [#dropzone]
Wraps [Root](/docs/primitives/dropzone#root) and accepts all [react-dropzone options](https://react-dropzone.js.org/#src) (`accept`, `maxFiles`, `onDropAccepted`, β¦).
### DropzoneZone [#dropzonezone]
Wraps [Zone](/docs/primitives/dropzone#zone) with dashed-border styling that reacts to the drag state data attributes.
### DropzoneInput [#dropzoneinput]
Wraps [Input](/docs/primitives/dropzone#input), the visually hidden file input.
### DropzoneUploadIcon [#dropzoneuploadicon]
Swaps the icon based on the drag state β an upload icon by default, a check when the drag is accepted and a ban icon when rejected. Render it inside ``. Accepts the same props as a [Lucide](https://lucide.dev) icon.
### DropzoneTrigger [#dropzonetrigger]
Wraps [Trigger](/docs/primitives/dropzone#trigger) for opening the file dialog from a button outside the zone.
### DropzoneAccepted, DropzoneRejected [#dropzoneaccepted-dropzonerejected]
Wrap [Accepted and Rejected](/docs/primitives/dropzone#accepted), render-prop parts receiving the accepted files or rejections.
# Emoji Picker (/docs/components/emoji-picker)
## About [#about]
The `` component is built on top of [frimousse](https://frimousse.liveblocks.io/).
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/emoji-picker
```
Install the following dependencies:
```bash
npm install @base-ui/react frimousse
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
EmojiPicker,
EmojiPickerSearch,
EmojiPickerContent,
EmojiPickerFooter,
} from "@/components/ui/emoji-picker";
```
```tsx
```
## Examples [#examples]
### Default [#default]
### Form [#form]
**Tip**: If you're looking to build a robust input field that supports emoji insertion, you're likely looking for a rich text editor. Some interesting solutions worth exploring include [Novel](https://novel.sh/) (powered by [Tiptap](https://tiptap.dev/)), [Plate](https://platejs.org/) (powered by [Slate](https://slatejs.org)), or [shadcn-editor](https://shadcn-editor.vercel.app/) (powered by [Lexical](https://lexical.dev/)). For lower-level control, you can also look into their underlying frameworks.
## API Reference [#api-reference]
Styled wrappers around [frimousse](https://frimousse.liveblocks.io/) β see the [frimousse API reference](https://frimousse.liveblocks.io/#api-reference) for the underlying props.
### EmojiPicker [#emojipicker]
Wraps `EmojiPicker.Root` and accepts all of its props (`onEmojiSelect`, `locale`, `skinTone`, `columns`, β¦).
### EmojiPickerSearch [#emojipickersearch]
Wraps `EmojiPicker.Search` with a search icon, accepting standard `` props such as `placeholder`.
### EmojiPickerContent [#emojipickercontent]
Wraps `EmojiPicker.Viewport` with the loading, empty and list states already composed and styled.
### EmojiPickerFooter [#emojipickerfooter]
A footer showing a preview of the active emoji and a skin tone selector. Renders a `
` and accepts its props.
# Password Input (/docs/components/password-input)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/password-input
```
Add `` and `` component to your project.
The `` component uses `` and `` components. Make sure you have it installed in your project.
See installation instructions for the [Input Group](https://ui.shadcn.com/docs/components/input-group) and [PasswordInputPrimitive](/docs/primitives/password-input#installation) components.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
PasswordInput,
PasswordInputAdornmentToggle,
PasswordInputInput,
} from "@/components/ui/password-input";
```
```tsx
```
## Examples [#examples]
### Default [#default]
### Checkbox [#checkbox]
### Form [#form]
## Accessibility [#accessibility]
The visibility toggle is icon-only β give it an accessible name, e.g. ``. The eye icons are decorative and hidden from assistive technology. The input renders as `type="password"` until toggled, so browser and password-manager behavior is unaffected by the extra parts.
## API Reference [#api-reference]
Styled wrappers around the [Password Input primitive](/docs/primitives/password-input#api-reference) β see the primitive page for the full prop tables. Custom adornments, such as a leading lock icon, are composed with shadcn/ui's [Input Group](https://ui.shadcn.com/docs/components/input-group) parts (`InputGroupAddon`, `InputGroupButton`) rather than Password Input-specific parts.
### PasswordInput [#passwordinput]
Wraps [Root](/docs/primitives/password-input#root) (`visible`, `defaultVisible`, `onVisibleChange`), rendered as an [Input Group](https://ui.shadcn.com/docs/components/input-group); remaining props go to the group element.
### PasswordInputInput [#passwordinputinput]
Wraps [Input](/docs/primitives/password-input#input) with input-group styling. Accepts standard `` props such as `placeholder` and `autoComplete`.
### PasswordInputAdornmentToggle [#passwordinputadornmenttoggle]
Wraps [Toggle](/docs/primitives/password-input#toggle) as an icon button in the trailing addon, swapping the eye icon based on the visibility state.
# Phone Input (/docs/components/phone-input)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/phone-input
```
Install the following dependencies:
```bash
npm install react-phone-number-input
```
Add the ``, `` and `` component to your project.
The `` component uses ``, `` and `` components. Make sure you have it installed in your project.
See installation instructions for the [PhoneInputPrimitive](/docs/primitives/phone-input#installation), [Input](https://ui.shadcn.com/docs/components/input) and [Select](https://ui.shadcn.com/docs/components/select) components.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import { SelectTrigger } from "@/components/ui/select";
import { PhoneInput } from "@/components/ui/phone-input";
```
```tsx
```
## Examples [#examples]
### Default [#default]
### Separated [#separated]
### Combobox [#combobox]
### Form [#form]
## Accessibility [#accessibility]
The country select trigger shows only a flag β give it an accessible name, e.g. ``, and label the phone input itself like any text input (via `` / `` in forms or `aria-label`). Flags are decorative; each option in the dropdown carries the country's name as text, so the selection is not communicated by the flag alone.
## API Reference [#api-reference]
Styled wrappers around the [Phone Input primitive](/docs/primitives/phone-input#api-reference) β see the primitive page for the full prop tables.
### PhoneInput [#phoneinput]
Wraps [Root](/docs/primitives/phone-input#root) and accepts all of its props (`value`, `onValueChange`, `country`, `onCountryChange`, `preferredCountry`, `international`, β¦).
### PhoneInputInput [#phoneinputinput]
Wraps [Input](/docs/primitives/phone-input#input), rendered as the styled [Input](https://ui.shadcn.com/docs/components/input) with a stable `render` reference already applied.
### PhoneInputCountrySelect [#phoneinputcountryselect]
The country selector, built on the styled [Select](https://ui.shadcn.com/docs/components/select) and wired to the country state β `value` and `onValueChange` are managed for you. Compose it with Select's own `SelectTrigger` plus `PhoneInputCountrySelectValue` and `PhoneInputCountrySelectContent`, which layer country-aware behavior over the corresponding Select parts.
### PhoneInputCountrySelectOptions [#phoneinputcountryselectoptions]
Renders the full options list: the "International" item followed by every supported country with its flag, name and calling code.
### PhoneInputCountrySelectItem, PhoneInputCountrySelectInternationalItem [#phoneinputcountryselectitem-phoneinputcountryselectinternationalitem]
Individual option items for composing a custom list. `PhoneInputCountrySelectItem` requires a `value: Country`; the international item selects `null`.
### PhoneInputFlag [#phoneinputflag]
Renders the flag for a `country`, falling back to a globe icon for `null` (International).
# Time Field (/docs/components/time-field)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/time-field
```
Add `` component to your project.
The `` component uses the `` component. Make sure you have it installed in your project.
See installation instructions for the [DateTimeField](/docs/components/date-time-field#installation) component.
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import {
TimeField,
TimeFieldAmPm,
TimeFieldHours,
TimeFieldMinutes,
TimeFieldSeconds,
TimeFieldSeparator,
} from "@/components/ui/time-field";
```
```tsx
```
## Examples [#examples]
### Default [#default]
### With AM/PM [#with-ampm]
### Form [#form]
## Accessibility [#accessibility]
The field follows the segment keyboard model and labeling guidance described in the [Date Time Field accessibility](/docs/components/date-time-field#accessibility) section, including A / P for the meridiem segment.
## API Reference [#api-reference]
A time-only preset of the [Date Time Field](/docs/components/date-time-field#api-reference) β each part wraps its Date Time Field counterpart and accepts the same props.
### TimeField [#timefield]
Wraps `DateTimeField` and accepts all of the [Root props](/docs/primitives/date-time-field#root) (`value`, `onValueChange`, `hour12`, β¦).
### TimeFieldHours, TimeFieldMinutes, TimeFieldSeconds [#timefieldhours-timefieldminutes-timefieldseconds]
Wrap the corresponding [segments](/docs/primitives/date-time-field#segments) with `--` as the default placeholder.
### TimeFieldAmPm [#timefieldampm]
Wraps [AmPm](/docs/primitives/date-time-field#ampm); renders only when the field has `hour12`.
### TimeFieldSeparator [#timefieldseparator]
Wraps the [separator](/docs/components/date-time-field#datetimefieldseparator) with `:` as the default children.
# Time (/docs/components/time)
## Installation [#installation]
CLI
Manual
```bash
npx shadcn@latest add junwen-k/ui-x/time
```
Install the following dependencies:
```bash
npm install date-fns
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage [#usage]
```tsx
import { Time } from "@/components/ui/time";
```
```tsx
```
## Examples [#examples]
### Default [#default]
### Format [#format]
## API Reference [#api-reference]
### Time [#time]
Renders a semantic `