docs/components/input/Input

Input

Text input with label, error, and size variants.

import { Input } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
type'text' | 'email' | 'tel' | 'url' | 'number' | 'search' | 'password''text'Input type variant.
placeholderstringPlaceholder text displayed when input is empty.
valuestringCurrent input value.
onInput(value: string) => voidCallback fired when input value changes.
disabledbooleanWhether the input is disabled.
errorstringError message displayed below the input.
classstringAdditional CSS class name.
idstringInput element ID for label association.
namestringInput element name for form submission.
unstyledbooleanfalseDisable default styling and apply only custom classes.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-border
  • --sk-duration-fast
  • --sk-error
  • --sk-font-size-base
  • --sk-font-size-sm
  • --sk-radius-md
  • --sk-space-sm
  • --sk-space-xs
  • --sk-text-muted
  • --sk-text-primary