Input
Text input with error state support. Extends native HTML input attributes.
Example
Current value:
This field is required
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | 'text' | 'password' | 'number' | 'text' | Input type |
error | string | — | Error message displayed below input |
class | string | — | Additional CSS classes |
Also accepts all native <input> attributes (placeholder, disabled, etc.).
Usage
<script>
import { Input } from '@chrissnell/chonky-ui';
let value = $state('');
</script>
<Input bind:value placeholder="Enter name" />
<Input type="password" placeholder="Password" />
<Input error="Required field" />