Files
base/node_modules/bits-ui/dist/bits/utilities/hidden-input.svelte
T
eewing ec317eb17c
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m11s
INIT
2026-02-18 15:17:47 -06:00

21 lines
502 B
Svelte

<script lang="ts">
import { mergeProps, srOnlyStylesString } from "svelte-toolbelt";
import type { HTMLInputAttributes } from "svelte/elements";
let { value = $bindable(), ...restProps }: HTMLInputAttributes = $props();
const mergedProps = $derived(
mergeProps(restProps, {
"aria-hidden": "true",
tabindex: -1,
style: srOnlyStylesString,
})
);
</script>
{#if mergedProps.type === "checkbox"}
<input {...mergedProps} {value} />
{:else}
<input bind:value {...mergedProps} />
{/if}