width
Description
Optional. Sets the width of a dropdownUsage
width?: string;
Default value
"100%"
Example
<script>
import { Dropdown, Calendar, Text } from "@svar-ui/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