0.2.2 • Published 12 months ago

react-tailwindcss-ts v0.2.2

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

React Tailwindcss Components Typescript

Introduction

Learn how to include easily React tailwindcss in your project.

Installation

npm install react-tailwindcss-ts

Importing Components

import { RTButton } from "react-tailwindcss-ts";

Components

Button Example

    import { RTButton } from "react-tailwindcss-ts";

    function TypesExample() {
        return (
            <>
                <RTButton name="Submit" type={'submit'} />
            </>
        );
    }

    export default TypesExample;

Button API

NameTypeDefaultDescription
name*RequiredstringName of button
classNamestringbg-indigo-700 hover:bg-indigo-900Tailwindcss class for button color, Example:bg-red-700 hover:bg-red-900,bg-green-700 hover:bg-green-900
typebuttonsubmitresetbuttonType of button,Example: button, submit, reset
buttonTypesmmdlgmdSize of button, Example: sm,md,lg
onClickfunctionCallback fired when a button is pressed
processingbooleanfalseFor Proccess is running or not

Input Example

    import { RTInput } from "react-tailwindcss-ts";

    function TypesExample() {
        return (
            <>
                <RTInput name="input" label="Password" type={'text'}  placeholder="Password"/>
            </>
        );
    }

    export default TypesExample;

Input API

NameTypeDefaultDescription
name*RequiredstringName of input field
classNamestringFor Extra Tailwindcss class
labelstringLable of Input
typetextpasswordemaildatedatetimenumbertextType of input
placeholderstringPlaceholder of Input
onChangefunctionCallback fired when a input is changed
idstringId of Input
formikbooleanfalseit's use for Formik validation field

Other Components Comming Soon