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 cancel() {
popup = false;
}
</script>

<div
on:click={() => (popup = true)}>
<Text/>
</div>

{#if popup }
<Dropdown 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