Input Field

A single-line text input. Three states — Default, Hover, Focus — with all colors, spacing and typography pulled directly from the LUSTER Figma component.

Figma Properties
State: Default
Border color: #F2EDFF
Text color: #62626D
Background: #FFFFFF
Padding: 8px 16px · Border: 2px

Variant

Default
Hover
Focus

Design Tokens

Token NameFigma VariableDefault Value
--inputFieldDefaultBgColorInputField/Default/Bg/Color#FFFFFF
--inputFieldDefaultBorderColorInputField/Default/Border/Color#F2EDFF
--inputFieldDefaultTextColorInputField/Default/Title/Font/Color#62626D
--inputFieldHoverBgColorInputField/Hover/Bg/Color#FFFFFF
--inputFieldHoverBorderColorInputField/Hover/Border/Color#916DFF
--inputFieldHoverTextColorInputField/Hover/Title/Font/Color#62626D
--inputFieldFocusBgColorInputField/Focus/Bg/Color#FFFFFF
--inputFieldFocusBorderColorInputField/Focus/Border/Color#916DFF
--inputFieldFocusTextColorInputField/Focus/Title/Font/Color#794DFF
--inputFieldPaddingXInputField/Padding/X16px
--inputFieldPaddingYInputField/Padding/Y8px
--inputFieldBorderWidthInputField/Border/Width2px
--inputFieldBorderRadiusInputField/Border/Radius0px
--inputFieldFontFamilyBody/Font/FamilyInter
--inputFieldFontSizeTypography/Body/Font/Size16px
--inputFieldFontLineHeightTypography/Body/Font/LineHeight19px
--inputFieldFontWeightTypography/Body/Font/Weight400

Usage Guidelines

✓ DO

Always pair an input with a visible label describing what to enter.

✓ DO

Use the Focus border color to clearly signal the active field.

✕ DON'T

Don't use placeholder text as a replacement for a label.

✕ DON'T

Don't remove the focus indicator — it's essential for accessibility.

Implementation

Values shown are the Diamond brand, Light mode defaults (the Figma file's default mode). Other brands (Amber, Opal) and Dark mode resolve to different values via the Color Theme & Component Brand collections.

import React from 'react';
import './InputField.css';

export interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
  label?: string;
}

export const InputField = React.forwardRef<HTMLInputElement, InputFieldProps>(
  ({ label, id, className = '', ...props }, ref) => (
    <div className="field-group">
      {label && <label htmlFor={id} className="field-label">{label}</label>}
      <input ref={ref} id={id} className={`field ${className}`} {...props} />
    </div>
  )
);

InputField.displayName = 'InputField';