Input

A native input element.

Installation

Install the component package, shared coss-svelte theme, and Bits UI peer.

npm install coss-svelte @coss-svelte/theme bits-ui

Usage

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.

PropTypeDefaultDescription
typeHTMLInputTypeAttribute | null"text"Behavior, selection, or HTML type passed to the underlying control.
bind:valueany-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