webflow svelte components logoWFS

Text input

Form field for single-line text entry.

Usage

<script lang="ts">
  import { TextInput } from '$lib/components/input';
</script>
<TextInput id="username" placeholder="Username" />

Properties

PropTypeDefault
icon
ComponentType
-
value
string
-
placeholder
string
-
disabled
boolean
false
error
boolean
false

Examples

Icon support

Use the icon property to add an icon to the TextInput component.

Error

Use the error property to indicate that the input has an error.

Disabled

Use the disabled property to prevent users from interacting with the input.

On this page