BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Pure UI/input-group

Input Group

pure-ui/input-group
FreeComponent

A customizable input group component

Install it

npx shadcn@latest add https://raw.githubusercontent.com/MusKRI/pure-ui/main/public/r/input-group.json

Source

src/registry/pure-ui/ui/input-group/index.tsxraw.githubusercontent.com/MusKRI/pure-ui/main/public/r/input-group.json
1"use client";
2
3import * as React from "react";
4import { tv, type VariantProps } from "tailwind-variants";
5
6import { cn } from "@/lib/classes";
7import { Input, type InputProps } from "@/registry/pure-ui/ui/input";
8import { Textarea, type TextareaProps } from "@/registry/pure-ui/ui/textarea";
9import { Button } from "@/registry/pure-ui/ui/button";
10
11function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12 return (
13 <div
14 data-slot="input-group"
15 role="group"
16 className={cn(
17 "relative group/input-group min-w-0 inline-flex rounded-lg iteems-center border border-input/70 bg-background dark:bg-input/32 text-base/5 shadow-xs outline-none",
18 "[transition:box-shadow_150ms_ease-out]",
19
20 // Variants based on alignment.
21 "has-[>[data-align=inline-start]]:[&>input]:pl-2",
22 "has-[>[data-align=inline-end]]:[&>input]:pr-2",
23 "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
24 "has-[>[data-align=block-end]]:[&>input]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>textarea]:pt-3",
25
26 // Focus State
27 "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[1px]",
28
29 // Error State
30 "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
31
32 className
33 )}
34 {...props}
35 />
36 );
37}
38
39const inputGroupAddonVariants = tv({
40 base: `flex h-auto cursor-text text-muted-foreground items-center justify-center text-sm gap-2 py-1.5 font-medium select-none not-has-[button]:**:[svg]:opacity-72 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 group-data-[disabled=true]/input-group:opacity-50`,
41 variants: {
42 align: {
43 "inline-start":
44 "order-first ps-[calc(--spacing(3)-1px)] has-[>[data-slot=badge]]:-ms-1.5 has-[>button]:-ms-2 has-[>kbd]:ms-[-0.35rem] [[data-size=sm]+&]:ps-[calc(--spacing(2.5)-1px)]",
45 "inline-end":
46 "order-last pe-[calc(--spacing(3)-1px)] has-[>[data-slot=badge]]:-me-1.5 has-[>button]:-me-2 has-[>kbd]:me-[-0.35rem] [[data-size=sm]+&]:pe-[calc(--spacing(2.5)-1px)]",
47 "block-start":
48// … truncated

What it pulls in

npm packages

  • clsx
  • tailwind-merge
  • tailwind-variants
  • @base-ui/react

Other registry items

  • input
  • textarea
  • button
  • classes

Files it writes

  • src/registry/pure-ui/ui/input-group/index.tsx

Facts

Registry
Pure UI
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
today

Go to the source

pure.kam-ui.com MusKRI/pure-ui on GitHub Raw registry item This item as JSON

More from Pure UI

All 291 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionPure UIComponentsFree4 deps
AvataravatarPure UIComponentsFree3 deps
BadgebadgePure UIComponentsFree4 deps
ButtonbuttonPure UIComponentsFree4 deps
Button Groupbutton-groupPure UIComponentsFree4 deps
CalendarcalendarPure UIComponentsFree4 deps
CardcardPure UIComponentsFree2 deps
CheckboxcheckboxPure UIComponentsFree4 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex