Input

Text field with 3 sizes, 14 types, 4 interaction states, and the Figma properties Label, Required, Help icon, Hint text and Destructive. Every type is a library component — pick the one you need.

import{ Input, Textarea, PhoneInput, CurrencyInput, PasswordInput, TagsInput, VerificationCodeInput, FileInput, NumberField } from "@pepulux/ui"

States — Placeholder / Filled / Focused / Disabled

Destructive: false

PlaceholderFilledFocusedDisabled

Destructive: true

This field is required

This field is required

This field is required

PlaceholderFilledFocusedDisabled

Sizes — sm / md / lg

Type: Email

Invalid email address

Type: Phone number — country code dropdown + flag

Type: Sale amount — trailing currency selector

Enter amount in USD

Type: Website

https://
https://

Enter a valid URL

Type: Card number

Invalid card number

Type: Password — checkmark hint

Must be at least 8 characters.

Incorrect password

Type: Password — strength bar

Use 8+ characters with a mix of letters, numbers and symbols.

Incorrect password

Type: Date

Date is required

Type: Number

Value out of range

Type: Tags

DesignMarketing

At least one tag is required

Type: Verification code (OTP)

Invalid code. Please try again.

Type: Upload file

File is required

Label extras — Required and Help icon

This is a hint text.

This field is required

Leading / trailing addon

Custom nodes in a bordered block — use for selects, units or domains.

https://.com
kg

Type: Number counter — horizontal and vertical

Textarea

Max 280 characters

Description is required

Props

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Height — 36 / 40 / 44px
typestring"text"HTML type — email | tel | password | number | date | url | search | text
destructivebooleanfalseFigma Destructive prop — red border and error state
errorboolean—Alias for destructive
errorTextstring—Error message (also activates destructive)
labelstring—Field label above the input
placeholderstring—Placeholder text
hintstring—Helper text below (normal state only)
leadingIconReactNode—Icon inside left edge
trailingIconReactNode—Icon/button inside right edge — can be interactive
leadingTextstring—Prefix block — "https://", etc.
requiredboolean—Figma Required * — brand asterisk after the label
helpTextstring—Figma Help icon — tooltip beside the label
leadingAddonReactNode—Bordered block before the input (select, prefix)
trailingAddonReactNode—Bordered block after the input (select, unit)
trailingActionReactNode—Interactive node inside the right edge (clear, toggle)
disabledbooleanfalseDisabled state
Base component → Inputswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Labels, hints and clear errors

Always use a visible label — placeholders disappear as soon as someone types. Mark required fields with the asterisk and use the help icon for brief clarifications.

Hint text explains the format; error text explains how to fix the problem. Validate on blur, not on every keystroke.

Do

  • Match the input type to the data (email, tel, number)
  • Show errors next to the field

Don't

  • Use placeholder text as the label

Choosing the right type

Use Phone number, Sale amount, Password, Verification code, Tags and Upload file when the data has structure. They handle formatting, masking and keyboard behaviour for you.