Input
A native input element.
<script lang="ts">
import { Input } from "coss-svelte";
</script>
<Input aria-label="Enter text" placeholder="Enter text" type="text" />
Installation
Install the component package, shared coss-svelte theme, and Bits UI peer.
npm install coss-svelte @coss-svelte/theme bits-uiUsage
Import the Svelte component exports directly from the package.
import { Input } from "coss-svelte";Anatomy
Input exposes a single component export for the current implementation.
API Reference
Input
A native input element.
| Prop | Type | Default | Description |
|---|---|---|---|
type | HTMLInputTypeAttribute | null | "text" | Behavior, selection, or HTML type passed to the underlying control. |
bind:value | any | - | Current value for the component. Bind with `bind:value` when supported. |
children : Snippet<[]>Inherits from Svelte <input> attributes.
Implementation Details
- Status
- Stable
- Foundation
- native
- Category
- Selection & Input
- Particles
- 19