1.2.0 • Published 3 years ago

glasscomponentss v1.2.0

Weekly downloads
86
License
CC
Repository
github
Last release
3 years ago

npm npm NPM

Welcome to Glasscomponentss

What's new

In this new version 1.1.8, we have two news components :D, are InputMessageGlass and ContactGlass, see more below.

Getting started

Hello devs!

This is the package with most beautiful components in glassmorphism for React app's.

Pre-requisites

This package was written in Typescript, it is necessary that your environment has support for typescript code.

Install

For install, execute in your terminal the code below:

    # using yarn
    yarn add glasscomponentss
    # OR using npm
    npm install glasscomponentss

Using

All components in this package has a default component called Container, the container has some default properties, see below:

  1. cardWidth
  2. cardHeight
  3. cardRadius
  4. cardColorBorder
  5. cardBackground
  6. cardGlass
  7. cardPaddingAll
  8. cardPaddingLeft
  9. cardPaddingRight
  10. cardPaddingTop
  11. cardPaddingBottom

About default properties

All properties below are used for basical definition of component, like your width, height, border, border radius, padding's and most important the Glass effect and your level.

Setting a component: For setting a component should set the following properties cardWidth, cardHeight, cardBackground, cardGlass, see below:

import { InputGlass } from "glasscomponentss"

    <InputGlass
        cardWidth={330}
        cardHeight={60}
        cardBackground="#f3f2f108"
        cardGlass={10}
    />

The cardWidth, cardHeight and cardGlass receive a value of the number, started of 0 or 0.0. For last the cardBackground for definition the color of your component, it a string in hexadecimal with opacity.

The other properties we using for definition of aesthetic the component, see below the table:

NameDescription
cardRadiusFor apply a radius in the component
cardColorBorderFor apply a color in border of the component
cardPaddingAllFor apply a internal spacing in all directions in the component
cardPaddingLeftFor apply a internal spacing in left side in the component
cardPaddingRightFor apply a internal spacing in right side in the component
cardPaddingTopFor apply a internal spacing in top side in the component
cardPaddingBottomFor apply a internal spacing in bottom side in the component

All components

Have following components in the actual version 1.1.0

  1. Input
  2. Box Message
  3. Credit Card
  4. Box Chat Message
  5. InputMessageGlass (New)
  6. ContactGlass (New)

InputGlass component

This component has the following properties:

NameDescriptionType
inputPlaceholderThe text of "description" of your inputstring
inputPlaceholderColorThe color of descrition textstring
buttonNameThe name of button, like "click here" or "send"string
buttonColorThe color of button, in hexadecimal with #string

BoxMessageGlass component

This component has the following properties

NameDescriptionType
boxMessageTitleThe title of messagestring
boxMessageContentThe message contentstring
boxMessageButtonColorThe background color of buttonstring
boxMessageButtonTextThe text of buttonstring
boxMessageCallBackA callbackfunction
boxMessageButtonTextColorThe color of text buttonstring

BoxChatGlass component

This component has the following properties

NameDescriptionType
boxChatContentThe content of messagestring
boxChatOnMeThis propertie is mandatory and it means if message is send for you(true) or no(false)boolean

CreditCardGlass component

This component has the following properties

NameDescriptionType
cardTitleThe name of operator credit car, for example: Nubank and Visastring
cardNumberThe number of credit cardnumber
cardNamePersonalThe personal name of userstring
cardDateValidThe valid date of credit cardstring
cardChipImageThe chip image of credit cardstring \ Data URI

InputMessageGlass

This component has some particularities, you are obliged send a function as callback for the properties inputMessageSend with inputMessageSend and inputMessageFile receiving a callback.

The inputMessageFile receive a callback and this callback should receive a string data as parameter, this parameter is the content of user in input.

The inputMessageSend receive a callback and this callback should receive a FileList data as parameter, this parameter is the content selected by user in yours files system and this component for default accepted file of type image/png, jpg and gif, and multiples selection.

NameDescriptionType
inputMessagePlaceholderColorThe color of text of descriptionstring
inputMessageTextContentColorThe color of text inside of inputstring
inputMessagePlaceholderThe description of inputstring
inputMessageMaxCharThe number max of charactersnumber
inputMessageEmojiIf should show a display of emojis (alpha)boolean
inputMessageButtonColorBackgroundThe background color of button to send a messagestring
inputMessageButtonColorThe color of text/icon inside of buttonstring
inputMessageButtomFileIf should show a button for user selected some files in your file systemboolean
inputMessageSendYour callback for get the message of user'sFuncition
inputMessageFileYour callback for get a array of filesFunction

ContactGlass

This component has some particularities, like a previous component, your dont are obliged send all propertie, the contactNumberOfMessage, this propertie only should send when the contactReadMessage is set for true.

NameDescriptionType
contactNameThe name of contactstring
contactImageThe image of contactstring
contactLastMessageThe last message for showstring
contactDateMessageThe date of send of messagestring
contactIsOnlineFor show a visual state for the user onlineboolean
contactReadMessageIf should show the number of messages send case the message dont was readboolean
contactNumberOfMessageNumber of message receivenumber

Contribute

New features, bug fixes and improvements are welcome! For questions and suggestions use the issues.

Donate :D

PicPay, thanks!

A Package created by a Brazilian for the world :D

Help me translate to all languages and fix problems for current translation :) .

This package belongs to a monorepo, the monorepo was created by me is part of my series of challenges of my channel on Twitch.

The aesthetic of package was inspired in following project RH Agency.

este pacote não possui quaisquer tipo de relação com a RH Agency e seus produtos, foi utilizado como inspiração visual alguns elemento como objetos 3d e cores apenas e não possui quaisquer objetivo comercial.

this package does not have any kind of relationship with the RH Agency and its products, was used as visual inspiration some element as 3d objects and colors only and has no commercial purpose.

See The UpLicense: Store Licensing for more details.

Github Monorepo

Glasscomponentss repository

Licença: