Skip to content

co-drawer

This content is not available in your language yet.

Ver código
<co-drawer heading="Título de ejemplo"></co-drawer>

Props

PropAtributoTipoDefaultDescripción
closableclosablebooleantrueShow close (X) button in header
closeOnEscapeclose-on-escapebooleantrueClose when pressing Escape
closeOnOverlayclose-on-overlaybooleantrueClose when clicking the backdrop
headingheadingstring''Drawer title (used when `header` slot is empty)
loadingloadingbooleanfalseShow a loading overlay over the body
openopenbooleanfalseWhether the drawer is visible
positionposition"bottom" | "left" | "right"'right'Side from which the drawer slides in
sizesize"full" | "lg" | "md" | "sm" | "xl"'md'Predefined sizes — sm 400 / md 520 / lg 720 / xl 960 / full 100%

Eventos

EventoDetailBubblesCancelableDescripción
coAfterClosevoidSlide-out animation finished.
coAfterOpenvoidSlide-in animation finished.
coClosevoidRequested to close (X, backdrop, Esc). Consumer should set `open=false`.
coOpenvoidTransitioned to open=true.

Slots

SlotDescripción
(default)Drawer body (scrollable).
footerFooter action area (right-aligned by default).
headerCustom header content (overrides `heading` prop). Receives close button next to it.
tabsOptional row under the header (e.g. <co-tab-group>).

CSS Parts

PartDescripción
::part(body)
::part(drawer)
::part(footer)
::part(header)
::part(loader)
::part(tabs)

CSS Custom Properties

Este componente no expone CSS custom properties.