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

@open-condo/ui

v2.30.1

Published

A set of React UI components for developing applications inside the condo ecosystem

Downloads

777

Readme

@open-condo/ui NPM

A set of React UI components for developing applications inside the condo ecosystem

Table of contents

Installation
Usage
Including styles
Access theme colors
Style-variables
Hooks

Installation

To install package simply run the following command if you're using npm as your package manager:

npm i @open-condo/ui

or it's yarn alternative

yarn add @open-condo/ui

Usage

You can import needed component with its props directly from package entry point like this:

import { Button } from '@open-condo/ui'
import type { ButtonProps } from '@open-condo/ui'

Including styles

To apply the styles, import the css file from library dist into your project root component:

import '@open-condo/ui/dist/styles.min.css'

Access theme colors

You can also directly access to all our theme colors by specifying import sub path like this:

import { colors } from '@open-condo/ui/colors'
import type { ColorPalette } from '@open-condo/ui/colors'

Style variables

Style tokens are available for import as well:

  • CSS Variables:
import '@open-condo/ui/style-vars/css'
  • Less Variables
@import (reference) "@open-condo/ui/style-vars/less";
@import (reference) "@open-condo/ui/dist/style-vars/variables.less";

Hooks

Hooks can be imported as follows:

import { useBreakpoints, useContainerSize } from '@open-condo/ui/hooks';
  • useBreakpoints - returns the breakpoint object and its current value. Breakpoint value becomes true if the window width is greater than or equal to the corresponding breakpoint. The name and width of the breakpoints:
    • MOBILE_SMALL (0px)
    • MOBILE_LARGE (360px)
    • TABLET_SMALL (480px)
    • TABLET_LARGE (768px)
    • DESKTOP_SMALL (992px)
    • DESKTOP_LARGE (1200px)
const breakpoints = useBreakpoints()

// window width >= 480px and < 992px
const isTablet = breakpoints.TABLET_SMALL && !breakpoints.DESKTOP_SMALL
  • useContainerSize provides the dimensions of a specific container.
const [{ width, height }, setRef] = useContainerSize()

console.log(width, height)

return <div ref={setRef} />