Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { PromptInput } from '@dryui/ui';
</script>

<PromptInput>Content</PromptInput>

Import options

Root package

ts
import { PromptInput } from '@dryui/ui'

Per-component subpath

ts
import { PromptInput } from '@dryui/ui/prompt-input'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Default

svelte
<script lang="ts">
  let value = $state('');
</script>
<PromptInput bind:value placeholder="Type a message…" />

With Submit Handler

svelte
<script lang="ts">
  let value = $state('');
  let submitted = $state('');
  function handleSubmit(text: string) {
    submitted = text;
    value = '';
  }
</script>
<PromptInput bind:value onpromptsubmit={handleSubmit} />
<p>Last submitted: {submitted}</p>

Disabled

svelte
<PromptInput disabled placeholder="Input disabled" />

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Prop Type Default Required Bindable
value
string
''
placeholder
string
disabled
boolean
onpromptsubmit
(value: string) => void
actions
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.