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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-kar-glassmorphism

v1.1.3

Published

React Glassmorphism package delivering 3 components which are fully customizable

Downloads

6

Readme

React kar Glassmorphism

  • We are facing some problem related to babel.
  • so this package is currently not compatible with CRA.
  • You can use this package on codesandbox

We provide 3 React components :

  • Gdiv - A modified HTML div Element
  • Ginput - A modified HTML input Element
  • Gbutton - A modified HTML button Element

start using this package by running

npm i react-kar-glassmorphism

Gdiv

The modified HTML div Element for glassmorphism

import {Gdiv} from 'react-kar-glassmorphism';
const App = () => {
  return (
    <Gdiv/>
  );
}

The most commonly used props are:

  • minWidth
  • minHeight
  • border
  • background
  • borderRadius
  • padding

The list of all props that can be passed to this react component are :

  • minWidth, minHeight, width, height, zIndex, border, background, borderRadius, backdropFilter, fontFamily, boxShadow, padding
  • You can use any css property as props aslong they are in js fromat (camelcase).
  • For things like hover, focus etc you can use classes and ids. These can be passed as props to this react component.

Ginput

The modified HTML div Element for glassmorphism

import {Ginput} from 'react-kar-glassmorphism';
const App = () => {
  return (
    <Ginput placeholder='name' stateValue={first} stateFunction={setFirst}/>
  );
}

The most commonly used props are:

  • placeholder
  • stateValue
  • stateFunction

The list of all props that can be passed to this react component are :

  • placeholder, stateValue, stateFunction, width, zIndex, border, background, borderRadius, fontFamily, padding, color
  • You can use any css property as props aslong they are in js fromat (camelcase).
  • For things like hover, focus etc you can use classes and ids. These can be passed as props to this react component.

Gbutton

The modified HTML div Element for glassmorphism

import {Gbutton} from 'react-kar-glassmorphism';
const App = () => {
  return (
    <Gbutton/>
  );
}

The most commonly used props are:

  • minWidth
  • minHeight
  • border
  • background
  • borderRadius
  • padding
  • color

The list of all props that can be passed to this react component are :

  • minWidth, minHeight, zIndex, border, background, borderRadius, backdropFilter, fontFamily, boxShadow, padding, color
  • You can use any css property as props aslong they are in js fromat (camelcase).
  • For things like hover, focus etc you can use classes and ids. These can be passed as props to this react component.

usecases

you can also pass childrens inside props.

App.js

import React,{useState,useEffect} from 'react';
import { Gdiv,Gbutton,Ginput } from 'react-kar-glassmorphism';
import './App.css';
const App = () => {
  const [first, setFirst] = useState('');
  useEffect(() => {
    console.log(first);
  }, [first]);
  
  return (
    // Gdiv has a child Ginput
    <Gdiv minWidth='10rem' minHeight='10rem' zIndex='1' border='1px solid white' background='rgba(255,255,255,.2)' borderRadius='0.5rem' backdropFilter='blur(0.2rem)' fontFamily='monospace' boxShadow='2px 2px 4px black' padding='0.7rem'>
      <Ginput/>
    </Gdiv>

    // Gbutton has a text as child
    <Gbutton minWidth='5rem' minHeight='3rem' zIndex='1' border='1px solid white' background='rgba(255,255,255,.1)' borderRadius='0.3rem' backdropFilter='blur(0.5rem)' fontFamily='monospace' boxShadow='2px 2px 5px black' padding='0.7rem' className='btn' color='white'>
      lol
    </Gbutton>

    // Ginput has react state and statefunction as props
    <Ginput placeholder='name' stateValue={first} stateFunction={setFirst} id='inputId'/>
  );
}

App.css

.btn:hover {
  background: red !important;  /* have to use !important as we want to change some inline css which has highest priority */
}

#inputId{
  font-weight: 500;
}