1.4.0 • Published 9 months ago

@roniwilliams12/simplified-ui-input v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

SimplifiedUI

simplifiedUI is a minimal React UI component library that includes customizable input components, designed for optimal designing in your application.

Table of Contents


Installation

Install simplifiedUI via npm:

npm i @roniwilliams12/simplified-ui-input 

Usage

  1. You have to install tailwindcss.
npm i tailwindcss -D postfix autoprefixer
npx tailwindcss init -p
  1. Here is an example code of how to use the component from SimplifiedUI
import {Input} from '@roniwilliams12/simplified-ui-input

const App=()=>{
    return (
        <>
            <Input 
                type="text"
                placeholder="enter placeholder"
                change={your_function}
                label="your_label"
            >
        </>
    )
}

Input Component

PropsTypesDescriptions
typestringThe input type (e.g., text, email, password)
labelstringUsed to add the label
placeholderstringUsed to add placeholder
valuestringUsed to add value
namestringUsed to add name for input
changefunctionThis is the onChange attribute return parametered with value in the input field
readonlybooleanDefines whether the input can perform read or write
requiredbooleanDefines whether the field is mandatory
stylesobjectThe object contains container input label keys and values are string

Customization

  • Using the styles attribute can override the styling to component.
  • Use the tailwindcss classes for styling.
  • The value to the attribute should be an object.

For example,

const inputStyle={
    container:" w-[500px] m-10 bg-slate-800",
    input:"text-white bg-slate-900",
    label:"text-lg font-bold"
}

Supported

React Tailwind CSS


THANK YOU FOR VISITING!!❤️