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

@front-app-react/elements

v2.0.1

Published

The @front-app-react/elements package is a collection of ReactJS components designed for use in web applications. styled-components are used for styles. These components are easy to use and highly customizable, making them ideal for a wide range of projec

Downloads

29

Readme

Elements Component

The @front-app-react/elements package is a collection of ReactJS components designed for use in web applications. styled-components are used for styles. These components are easy to use and highly customizable, making them ideal for a wide range of projects. @front-app-react/theme is used to manage the theme

Demo

demo for using demo-front-app-react

Installing

npm i @front-app-react/elements

Components

List of components used:

  • Button - Button allow users to take actions, and make choices, with a single tap.
  • Card - Cards contain content and actions about a single subject.
  • Divider - A divider is a thin line that groups content in lists and layouts.
  • Dropdown - A Dropdown can be used to display some content on top of another.
  • Modal - The modal component provides a solid foundation for creating dialogs, dropdown, lightboxes, or whatever else.
  • Overlay - The Overlay component narrows the user's focus to a particular element on the screen.
  • Table - A fast react data table and react data grid.
  • Tabs - Tabs make it easy to explore and switch between different views.
  • Typography - Use typography to present your design and content as clearly and efficiently as possible.

The Gist

They use React context to hook into the parent state/methods.

import { ElementsProvider } from "@front-app-react/elements";
    <ElementsProvider theme={theme} styles={styles}>
        ...otherCode
    </ElementsProvider>

ThemeProvider Props

| props | description | | -------- | ------------------------------------------------------------------------ | | theme* | props @front-app-react/theme | | styles* | Basic styling for props elements |

prop styles

Properties are not required | property | value |--|--| |btn| Button Props |card| Card Props |divider| Divider Props |dropdownMenu| DropdownMenu Props |table| Table Props |tab| Tab Props |typography| Typography Props

props button component

Button allow users to take actions, and make choices, with a single tap.

  • $textColor (optional): a partial type of ThemeColor interface.
  • $bgColor (optional): a partial type of ThemeColor interface.
  • $borderColor (optional): a partial type of ThemeColor interface.
  • $isCircle (optional): a boolean that indicates whether the button should be circular.
  • $isIcon (optional): a boolean that indicates whether the button should display an icon.
  • $isBlock (optional): a boolean that indicates whether the button should take up the full width of its container.
  • $isActive (optional): a boolean that indicates whether the button is currently active or not.
  • $sizing (optional): a string literal type that can be either "sm" or "lg".
  • $withoutColor (optional): a boolean that indicates whether the button should have any colors applied to it.
  • $withoutActions (optional): a boolean that indicates whether any actions should be applied to the button.
  • $boxShadow (optional): a CSS property that defines the shadow effect of the button.

props card component

Cards contain content and actions about a single subject.

  • $border (optional): a partial type of Border interface.
  • $bgColor (optional): a partial type of Color interface.
  • $width (optional): a CSS property that defines the width of the box.
  • $height (optional): a CSS property that defines the height of the box.
  • $radius (optional): a CSS property that defines the border radius of the box.
  • $boxShadow (optional): a CSS property that defines the shadow effect of the box.

props divider component

Cards contain content and actions about a single subject.

  • $bgColor (optional): a partial type of Color interface.
  • $width (optional): a CSS property that defines the width of the box.
  • $height (optional): a CSS property that defines the height of the box.

props overlayBg component

The Overlay component narrows the user's focus to a particular element on the screen.

props modal component

The modal component provides a solid foundation for creating dialogs, dropdown, lightboxes, or whatever else.

  • dialog (optional):
    • $paddingTop (optional): a string that defines the top padding of the dialog.
    • $paddingBottom (optional): a string that defines the bottom padding of the dialog.
  • content (optional): a type of CustomCSSProperties that defines the style of the content.
  • heading (optional): a type of CustomCSSProperties that defines the style of the heading.

props table component

A fast react data table and react data grid.

props tab component

Tabs make it easy to explore and switch between different views.

  • data is an array of objects, each of which has a title and content property that can be of any React Node type.
  • getActive (optional): is an optional callback function that takes an active index as a parameter.
  • defaultActiveIndex (optional): is an optional number that specifies the default active index.
  • styleCard (optional): a type of CustomCSSProperties style .
  • styleBtnTab (optional): a type of CustomCSSProperties style .

props typography component

Use typography to present your design and content as clearly and efficiently as possible.

  • $fontSize (optional): a string that defines the font size of the text.
  • $fontFamily (optional): a string that defines the font family of the text.
  • $textColor (optional): a partial type of Color interface.
  • $fontWeight (optional): a string that defines the font weight of the text.
  • $textTransform (optional): which is of the same type as the textTransform property of the CSSProperties interface.
  • $lineHeight (optional): is a string that specifies the line height of the text.

props dropdown component

A Dropdown can be used to display some content on top of another.

Type CustomCSSProperties

which extends the CSSProperties interface.

  • $textColor (optional): a partial type of ThemeColor interface.
  • $bgColor (optional): a partial type of ThemeColor interface.
  • $borderColor (optional): a partial type of ThemeColor interface.

Type Border

  • direction (optional): a type that defines a Record with top,right,bottom,left as keys and an object as value. The object has the following properties:
    • size (optional): a number that defines the size of the border.
    • color (optional): a type of ThemeColor that defines the color of the border.
    • style (optional): a string that defines the style of the border.
  • size (optional): a number that defines the size of the border.
  • color (optional): a type of ThemeColor that defines the
  • style (optional): a string that defines the style of the border.