drawer/DrawerContent.vue

shadcn-vue · apps/v4/styles/reka-luma/ui/drawer/DrawerContent.vue · vue · MIT
ui

Reusable off-canvas drawer for modals and side panels.

<!--
  Source: https://github.com/unovue/shadcn-vue | License: MIT | Copyright 2023 unovue
  Provided via justclaw.it.com; keep this notice with the code.
-->
<script lang="ts" setup>
import type { DrawerContentEmits, DrawerContentProps } from 'reka-ui'
import type { HTMLAttributes } from 'vue'
import { reactiveOmit } from '@vueuse/core'
import { cn } from 'cn'
import {
  DrawerContent,
  DrawerHandle,
  DrawerPortal,
  useForwardPropsEmits,
} from 'reka-ui'
import DrawerOverlay from './DrawerOverlay.vue'

defineOptions({
  inheritAttrs: false,
})

const props = defineProps<DrawerContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DrawerContentEmits>()

const delegatedProps = reactiveOmit(props, 'class')

const forwarded = useForwardPropsEmits(delegatedProps, em

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key