
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
-isoftdata-svelte-select
Advanced tools
npm i @isoftdata/svelte-select
| Name | Type | Description | Default |
|---|---|---|---|
| class | string | Any additional classes to apply to the <select>. | "" |
| disabled | boolean | Whether the select component is disabled or not. | false |
| emptyText | string | The label for the empty option. | -- Select {label} -- |
| emptyValue | T | null | The value of the empty option. | null |
| hint | string | The hint text to be displayed below the select component. | "" |
| hintClass | string | The class name to be applied to the hint text. | "" |
| hintClickable | boolean | Whether the hint text is clickable or not. | false |
| id | string | The id to be applied to the select component. | "id" + uuid() |
| isLoading | boolean | Whether to show the Label's loading icon. | false |
| label | string | null | The label text to be displayed above the select component. | null |
| labelClass | string | The class name to be applied to the label text. | "" |
| name | string | The name to be applied to the select component. | "" |
| options | Array<T> | The options to be displayed in the select component. See "Specifying Options" for details. | [] |
| required | boolean | Whether the select component is required or not. | false |
| showEmptyOption | boolean | Whether to show an "empty" option. | true |
| showLabel | boolean | Whether to show the label text or not. | true |
| size | "" | "sm" | "lg" | The size of the select component. | "sm" |
| textEllipsis | boolean | Whether to apply text ellipsis to the select component or not. | false |
| title | string | The title to be applied to the select component. | "" |
| value | T | T[keyof T] | null | The value of the select component. Svelte allows this to be any type, including an Object. | None (Required) |
options you want to apply to the component.
options prop to the component, this slot will be rendered once per entry of the options array.option whose type is T | undefined. It will be T when options is specified, and undefined when it is not.By default, the default slot will just insert its contents into the select's inner HTML.
Options can be specified three ways:
options to the default slot, and do not pass an options prop. (Manual Options in Example)options prop, and do not pass anything into the default slot. The values of options will be used as both the value and label for each option. (Auto Options in Example)options prop, add a let:{option} prop to the Select, and pass a single option in the default slot, which can reference values from option. (Semi Auto Options in Example)<script lang="ts">
import Select from "@isoftdata/svelte-select"
let selectValue: number | null = null
let selectValue2: string = ""
let selectValue3: number | null = null
let selectValue4: { id: number; label: string } | null = null
const objectOptions = [
{ id: 1, label: "One" },
{ id: 2, label: "Two" },
{ id: 3, label: "Three" },
]
const stringOptions = ["One", "Two", "Three"]
</script>
<div class="container">
<h1>Select</h1>
<div class="row">
<div class="col-3">
<Select
label="Manual Options"
bind:value={selectValue}
>
{#each objectOptions as option}
<option value={option.id}>{option.label}</option>
{/each}
</Select>
</div>
<div class="col-3">
<Select
label="Auto Options"
bind:value={selectValue2}
options={stringOptions}
emptyValue=""
/>
</div>
<div class="col-3">
<Select
label="Semi Auto Options"
options={objectOptions}
bind:value={selectValue3}
let:option
>
<option value={option?.id}>{option?.label}</option>
</Select>
</div>
<div class="col-3">
<Select
label="Object Key"
bind:value={selectValue4}
>
{#each objectOptions as option}
<option value={option}>{option.label}</option>
{/each}
</Select>
</div>
</div>
</div>
FAQs
## Install
We found that -isoftdata-svelte-select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.