sheet
accelya-ui-lib/sheetFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ramsaoji/Accelya-UI-Lib/main/public/r/styles/default/sheet.jsonSource
1"use client"23import * as React from "react"4import * as SheetPrimitive from "@radix-ui/react-dialog"5import { cva, type VariantProps } from "class-variance-authority"6import { X } from "lucide-react"78import { cn } from "@/lib/utils"910const Sheet = SheetPrimitive.Root1112const SheetTrigger = SheetPrimitive.Trigger1314const SheetClose = SheetPrimitive.Close1516const SheetPortal = SheetPrimitive.Portal1718const SheetOverlay = React.forwardRef<19 React.ElementRef<typeof SheetPrimitive.Overlay>,20 React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>21>(({ className, ...props }, ref) => (22 <SheetPrimitive.Overlay23 className={cn(24 "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",25 className26 )}27 {...props}28 ref={ref}29 />30))31SheetOverlay.displayName = SheetPrimitive.Overlay.displayName3233const sheetVariants = cva(34 "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",35 {36 variants: {37 side: {38 top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",39 bottom:40 "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",41 left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",42 right:43 "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",44 },45 },46 defaultVariants: {47 side: "right",48 },49 }50)5152interface SheetContentProps53 extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,54 VariantProps<typeof sheetVariants> {}5556const SheetContent = React.forwardRef<57 React.ElementRef<typeof SheetPrimitive.Content>,58 SheetContentProps59>(({ side = "right", className, children, ...props }, ref) => (60 <SheetPortal>61 <SheetOverlay />62 <SheetPrimitive.Content63 ref={ref}64 className={cn(sheetVariants({ side }), className)}65 {...props}66 >67 {children}68// … truncated
What it pulls in
npm packages
Files it writes
More from shadcn/ui
All 357 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | 1 dep | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | 1 dep | |
| avataravatar | shadcn/ui | Components | Free | 1 dep | |
| badgebadge | shadcn/ui | Components | Free | 1 dep | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | 1 dep | |
| buttonbutton | shadcn/ui | Components | Free | 1 dep |
