Input
A text entry field.
Anatomy
<script>
import { Input } from '@shardsui/svelte/input'
</script>
<Input />Usage guidelines
- Form controls must have an accessible name: give the input a
<label>element, or wrap it in theFieldparts. See the forms guide. InputisField.Controlunder a shorter import: inside a<Field.Root>it picks up the label association, validation state and error bindings documented in Field. Outside one it is a plain<input>.
API reference
Other standard <input> props (type, required, pattern, placeholder, etc.) pass through, as
do <textarea> props (rows, cols, wrap) when as="textarea".
Outside a <Field.Root> only data-disabled and a forwarded aria-describedby are emitted.