Input | UI Showcase
WRNexus UI
Forms component

Input

Theme-aware, responsive input component.

28 props0 slots7 outputsTheme readyResponsive
Interactive playground

Configure Input

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<Input
  placeholder="Enter a sample value"
  value="sample-1"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props28 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Component usage.wrn
<Input
  placeholder="Enter a sample value"
  value="sample-1"
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Component usage.wrn
<Input
  size="sm"
  label="Compact example"
  placeholder="Enter a sample value"
  value="sample-2"
  variant="secondary"
  icon="icon-[lucide--arrow-right]"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Component usage.wrn
<Input
  size="lg"
  label="Advanced example"
  placeholder="Search by name, email, or identifier"
  value="sample-3"
  variant="success"
  icon="icon-[lucide--trash-2]"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@inputFires as the editable value changes.
@changeFires when the component's committed value or selection changes.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
@invalidFires when the component emits the invalid event.
@keydownFires when the component emits the keydown event.
@keyupFires when the component emits the keyup event.
Declarative handlers.wrn
<Input
  @input='console.log(payload)'
  @change='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
  @invalid='console.log(payload)'
  @keydown='console.log(payload)'
  @keyup='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"Input\"], [data-component=\"Input\"]")

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})

if (component) registerOutputHandler(component, "invalid", (payload) => {
  console.log("invalid", payload)
})

if (component) registerOutputHandler(component, "keydown", (payload) => {
  console.log("keydown", payload)
})

if (component) registerOutputHandler(component, "keyup", (payload) => {
  console.log("keyup", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
idstring""No
namestring""No
labelstring"Input"No
hiddenLabelbooleanfalseNo
placeholderstring""No
valuestring""No
typestring"text"No
variantstring"normal"No
iconstring""No
iconPositionstring"start"No
helperTextstring""No
cornerHintstring""No
errorstring""No
inlinebooleanfalseNo
readonlybooleanfalseNo
disabledbooleanfalseNo
requiredbooleanfalseNo
autocompletestring""No
inputmodestring""No
minlengthstring""No
maxlengthstring""No
patternstring""No
minstring""No
maxstring""No
stepstring""No
classstring""No