Skip to main content

width

Description

sets the width of a dropdown

Type

string

Default value

"100%"

Example

<script>
import { Dropdown, Calendar, Text } from "wx-svelte-core";

let popup;

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

<div
onclick={() => (popup = true)}>
<Text/>
</div>

{#if popup }
<Dropdown {oncancel} width={"300px"}>
<Calendar value={new Date(2023, 2, 15)} />
</Dropdown>
{/if}

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