Skip to content

Sheet

Panel lateral modal. Similar a Drawer pero con más control sobre el contenido y la estructura.


Import

jsx
import {
  Sheet,
  SheetTrigger,
  SheetContent,
  SheetHeader,
  SheetTitle,
  SheetDescription,
  SheetFooter,
  SheetClose,
} from '@imansi/ui';

Uso básico

jsx
<Sheet>
  <SheetTrigger asChild>
    <Button variant="outline">Abrir panel</Button>
  </SheetTrigger>
  <SheetContent>
    <SheetHeader>
      <SheetTitle>Editar perfil</SheetTitle>
      <SheetDescription>
        Modificá tu información personal.
      </SheetDescription>
    </SheetHeader>
    <div className="py-4">
      {/* contenido */}
    </div>
    <SheetFooter>
      <SheetClose asChild>
        <Button variant="outline">Cancelar</Button>
      </SheetClose>
      <Button>Guardar</Button>
    </SheetFooter>
  </SheetContent>
</Sheet>

Desde distintos lados

jsx
<SheetContent side="right">  {/* por defecto */}
<SheetContent side="left">
<SheetContent side="top">
<SheetContent side="bottom">

Props

SheetContent

PropTipoDefaultDescripción
side'top' | 'right' | 'bottom' | 'left''right'Lado de apertura

Diferencia con Drawer

CaracterísticaSheetDrawer
EstructuraCompleta (Header/Footer)Más libre
APICercana a DialogMás custom
Uso típicoFormularios lateralesMenús mobile

Hecho con ❤️ en Argentina