Skip to main content

width

Description

Optional. Sets the width of a dropdown

Usage

width?: string;

Default value

"100%"

Example

<script setup>
import { ref } from "vue";
import { Dropdown, Calendar, Text } from "@svar-ui/vue-core";

const popup = ref(false);

function oncancel() {
popup.value = false;
}
</script>

<template>
<div @click="popup = true">
<Text/>
</div>

<Dropdown v-if="popup" :oncancel="oncancel" width="300px">
<Calendar :value="new Date(2023, 2, 15)" />
</Dropdown>
</template>

Details

This property corresponds to the width CSS property and can take all its values set as strings.

Related article: Setting the width of Dropdown