feat: add UI components for skeleton, slider, sonner, spinner, switch, table, tabs, textarea, toggle group, toggle, tooltip, and mobile hook

- Implemented Skeleton component for loading placeholders.
- Created Slider component with customizable properties.
- Added Sonner component for toast notifications with icons.
- Developed Spinner component for loading indicators.
- Introduced Switch component for toggle functionality.
- Built Table component with header, body, footer, and cell subcomponents.
- Added Tabs component with list, trigger, and content subcomponents.
- Created Textarea component for user input.
- Implemented ToggleGroup and Toggle components for grouped toggle functionality.
- Developed Tooltip component with provider, trigger, and content subcomponents.
- Added useIsMobile hook to detect mobile device viewport.
This commit is contained in:
asepharyana
2026-07-23 11:16:34 +07:00
parent 5acb138f96
commit 18bf58be1a
62 changed files with 7481 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
import * as React from "react"
import { Input as InputPrimitive } from "@base-ui/react/input"
import { cn } from "@/lib/utils"
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (
<InputPrimitive
type={type}
data-slot="input"
className={cn(
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
className
)}
{...props}
/>
)
}
export { Input }