New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-input-glow

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-glow

reusable input box

  • 2.0.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

React Input Glow Component

The React Input Glow Component provides a flexible and customizable input field with floating labels. It is designed to be easy to use and highly configurable.

Installation

You can install the React Glow Input Component using npm or yarn:

npm install react-input-glow

or

yarn add react-input-glow

Usage

To use the React Input Glow Component, you should import the FloatingInputProps interface from 'react' and use it to define the props for your input field. Here's an example of how to use it:

import React from 'react';
import InputBox from 'react-input-glow';

const MyForm = () => {
  const handleChange = (value) => {
    // Handle input value change
  };

  return (
    <div>
      <h2>Example Form</h2>
      <label>Name:</label>
      <InputBox
        name="name"
        label="Name"
        placeholder="Enter your name"
        onChange={handleChange}
        // Add other props as needed
      />
      {/* Add more input fields */}
    </div>
  );
};

export default MyForm;

In this example, we import the FloatingInputProps interface and use it to define the props for our input field. We can customize various aspects of the input field, such as the label, placeholder, and event handlers.

Feel free to explore the available props in the FloatingInputProps interface and adjust them to fit your specific use case. The React Input Glow Component is highly customizable and can be integrated into your forms with ease.

Storybook Example

You can also explore more examples in the React Input Glow Component Storybook.

Props Table

Here's a table of available props for the FloatingInputProps interface:

PropTypeDescription
namestringThe name attribute for the input field.
labelstringThe label for the input field.
placeholderstringThe placeholder text for the input field.
onChange(value: stringany) => void
typestringThe type of the input field (e.g., "text", "password").
classNamestringAdditional CSS class for the input container.
inputClassNamestringAdditional CSS class for the input field.
labelPosition'inline' | 'outside' | 'inside'The position of the label.
labelClassNamestringAdditional CSS class for the label element.
borderRadiusstringThe border radius for the input container.
heightstringThe height of the input field.
widthstringThe width of the input field.
borderColorstringThe border color of the input field.
borderWidthstringThe border width of the input field.
iconPosition'left' | 'right'The position of an icon (if provided).
iconanyAn icon component to display within the input.
requiredbooleanWhether the input is required.
isFloatingbooleanWhether the label should float on focus.
disabledbooleanWhether the input is disabled.
labelBackgroundstringThe background color of the label.
textColorstringThe text color of the input field.
primaryColorstringThe primary color of the input field.
secondaryColorstringThe secondary color of the input field.

Keywords

FAQs

Package last updated on 07 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc