npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-lite-float-inputs

v1.0.5

Published

A lightweight, high-performance React input library featuring Material-style floating labels with minimal DOM footprint. Supports Input, TextArea, and Select with a unique dual-text feature (separate placeholder and label). Smooth CSS animations, border-i

Readme

react-lite-float-inputs

A lightweight, high-performance React input library featuring Material-style floating labels with a minimal DOM footprint.

Designed for developers who want clean markup, smooth UX, and full control — without fieldset, extra wrappers, or heavy dependencies.


Features

  • Ultra-lightweight DOM

    • Only one wrapper div, plus input / textarea / select and label
    • No fieldset, no legends, no unnecessary elements
  • Dual-text system (Unique Feature)

    • Placeholder text appears inside the field initially
    • Label text floats to the top on focus/value
    • Placeholder and label can be different or the same
  • Border-integrated floating label

    • Label smoothly animates into the border area
    • Clean, modern Material-style look
  • Smooth CSS-only animations

    • No JS animation overhead
    • GPU-friendly transitions
  • Components included

    • Input
    • TextArea
    • Select

Installation

npm install react-lite-float-inputs

or

yarn add react-lite-float-inputs

Import

import Input, { TextArea, Select } from "react-lite-float-inputs";

Basic Usage

Input

<Input
  type="text"
  name="name"
  label="name"
  value={form.budget}
  onChange={handleChange}
  placeholder="Your Name"
/>

TextArea

<TextArea
  name="message"
  value={form.message}
  onChange={handleChange}
  label="Message"
  placeholder="Tell us about yourself"
  rows={5}
  required
/>

Select Usage

<Select
  name="category"
  label="Category"
  value={form.category}
  onChange={handleChange}
>
  <option value="">Select a category</option>
  <option value="web">Web Development</option>
  <option value="mobile">Mobile App</option>
  <option value="design">UI/UX Design</option>
</Select>

Customize Colors

:root {
    --input-color-primary: #FFF; /* Set your primary color */
    --input-color-background: #151515; /* Set your background color */
    --input-color-border: #CCCCCC; /* Set your border color, it will be automatically set from computed primary color if unset*/
    --input-color-placeholder: #999999; /* Set your placeholder color, it will be automatically set from computed primary color if unset */
}

How the Dual-Text System Works

| State | What you see | | ----------------- | ---------------------------------------- | | Empty & unfocused | Placeholder text inside the field | | Focused | Placeholder animates into floating label | | Has value | Label stays floated |

  • If label and placeholder are different → both are respected
  • If label is omitted → placeholder text is reused as label

DOM Structure (Example)

<div class="rfl-input-wrapper">
  <input /> <!-- with all props passed -->
  <label>Label Text</label>
</div>

That’s it. No extra noise.


Props

Common Props (Input / TextArea / Select)

| Prop | Type | Description | | ------------- | ---------- | ------------------------ | | label | string | Floating label text | | placeholder | string | Initial placeholder text | | name | string | Input name | | value | string | Controlled value | | onChange | function | Change handler | | required | boolean | Marks field as required | | disabled | boolean | Disables the field | | className | string | Custom class for wrapper |

Input-specific

| Prop | Type | Description | | ------ | -------- | ---------------------------------- | | type | string | text, email, password, number, etc |

TextArea-specific

| Prop | Type | Description | | ------ | -------- | -------------- | | rows | number | Number of rows |


Styling

The library ships with sensible defaults.

You can override styles using:

  • Wrapper class
  • Input / label selectors
  • CSS variables (if provided by your theme)

Example:

.rfl-wrapper {
  --rfl-border-color: #ccc;
  --rfl-focus-color: #6366f1;
}

Compatibility

  • ✅ React 18+
  • ✅ Next.js (App & Pages Router)
  • ✅ Vite / CRA

Philosophy

This library was built with one goal:

Maximum UX with minimum markup

If you care about performance, DOM cleanliness, and polished micro-interactions — this is for you.


License

MIT © Abdullah Ibne Alam


Contributing

Pull requests are welcome! If you have ideas for enhancements or performance improvements, feel free to open an issue. https://github.com/RepulsiveCoder/react-lite-float-inputs


If you like it…

Drop a ⭐ on the repo and use it to make your UI feel alive!