All Projects → panther-labs → pounce

panther-labs / pounce

Licence: Apache-2.0 License
🐯 Composable react primitives for building UI dashboards

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pounce

taiga-ui
Angular UI Kit and components library for awesome people
Stars: ✭ 2,251 (+11155%)
Mutual labels:  ui-components
bui
‹b› Web components for creating applications – built by Blackstone Publishing using lit-html and lit-element
Stars: ✭ 29 (+45%)
Mutual labels:  ui-components
natural js
Natural-JS : Javascript Front-End Architecture Framework
Stars: ✭ 35 (+75%)
Mutual labels:  ui-components
clarity-react
React Components for VMware Clarity UI and Clarity Design
Stars: ✭ 33 (+65%)
Mutual labels:  ui-components
ui
💁‍♀️ Inclusive Vue Components
Stars: ✭ 27 (+35%)
Mutual labels:  ui-components
CCheckbox-iOS
CCheckbox is a custom UIView which represents custom checkbox component with custom images
Stars: ✭ 28 (+40%)
Mutual labels:  ui-components
light-ui
A lightly React UI library
Stars: ✭ 38 (+90%)
Mutual labels:  ui-components
elements
Lovingly crafted ui components based on web components. Works well with all Frameworks - including Angular, React and Vue.
Stars: ✭ 42 (+110%)
Mutual labels:  ui-components
MutativeFab
This is animating floating action button with text
Stars: ✭ 54 (+170%)
Mutual labels:  ui-components
BottomSheet
BottomSheet lets you add custom bottom sheets to your SwiftUI apps.
Stars: ✭ 111 (+455%)
Mutual labels:  ui-components
InplaceEditBoxLib
WPF/MVVM control to implement a textbox on top of other elements like TreeViewItem or ListViewItem (use case: perform in place edit on top of a displayed text item)
Stars: ✭ 28 (+40%)
Mutual labels:  ui-components
ios-swift-chat-ui-kit
Ready-to-use Chat UI Components for Swift (iOS)
Stars: ✭ 42 (+110%)
Mutual labels:  ui-components
wot-design-mini
An ui component library for mini program
Stars: ✭ 28 (+40%)
Mutual labels:  ui-components
MaterialDayPicker
An elegant day of the week picker inspired by Google's clock app
Stars: ✭ 59 (+195%)
Mutual labels:  ui-components
unity-ui-manager
🎫 A Simple UI Manager for rapid prototyping and ease of collaboration
Stars: ✭ 44 (+120%)
Mutual labels:  ui-components
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (+395%)
Mutual labels:  ui-components
ColorPick.js
A simple and minimal jQuery color picker plugin for the modern web.
Stars: ✭ 48 (+140%)
Mutual labels:  ui-components
skelet
Skelet.css a contemporary CSS framework. The basics to get started.
Stars: ✭ 69 (+245%)
Mutual labels:  ui-components
sport-stats
Sport stats UI components
Stars: ✭ 62 (+210%)
Mutual labels:  ui-components
play-tailwind
Play is free and open source Tailwind CSS template for - Startup, SaaS, Apps, Business and More. It comes with a high-quality design and all essential components & pages you need to launch a complete website.
Stars: ✭ 60 (+200%)
Mutual labels:  ui-components

Pounce

🐯A Set of Composable React Primitives for Building UI Dashboards

CircleCI

Description

This project contains common UI components for building dashboards written in TypeScript. It's currently used by Panther

Docs

Documentation is available on http://pouncejs.surge.sh/.

Installation

Pounce heavily depends on Typescript and thus has a limitation of Typescript 3.8.x. Please make sure that your project doesn't use an older version of Typescript.

$ npm install pouncejs

Usage

Quick Start

  1. To start, wrap your app with the ThemeProvider components:
import { ThemeProvider } from 'pouncejs';

const App = () => (
    <ThemeProvider>
       <Router>
         ...
       </Router
    </ThemeProvider>
)
  1. Install DM Sans:
<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap"
/>
  1. Then you are ready to go!
import { Box, Button } from 'pouncejs';

Advanced

To use the library you'll need to wrap your app with the <ThemeProvider> so that your components can have access to the theme. By default <ThemeProvider> utilises the default Theme that Pounce exposes, but you can easily override that by passing a theme prop to it.

This can be done like so:

import { ThemeProvider } from 'pouncejs';
import theme from '../my/theme.js';

const App = () => (
    <ThemeProvider theme={theme}>
       <Router>
         ...
       </Router
    </ThemeProvider>
)

Make sure to wrap your entire app with a <ThemeProvider> to avoid un-necessary reconsiliations and to gain in performance.

The next step would be to make sure you have your selected font-family installed. By default, Pounce uses DM Sans as it fits the default theme the best. If you are using the default theme, make sure you install DM Sans in your prefered way. The easiest of them all is by adding a link tag in your html:

<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/css2?family=DM+Sans:400,500,700&display=swap"
/>

If you want to use another font-family, simply install it and make sure to mimic this change in the theme that you will provide to <ThemeProvider />. The change that you need to make is in the fonts.primary key of the theme. For example:

import { defaultTheme } from 'pouncejs';

export const myTheme = {
  ...defaultTheme,
  fonts: {
    ...defaultTheme.fonts,
    primary: 'Lato, sans-serif',
  },
};

This way you can keep all the defaults and only change the font-family exposed. You can also add keys to the theme if you want to have a centralised theme configuration that can also be used outside the context of pounce:

import { defaultTheme } from 'pouncejs';

export const myTheme = {
  ...defaultTheme,
  fonts: {
    ...defaultTheme.fonts,
    secondary: 'Inconsolata, monospace',
  },
};

By default, pounce ships with dashboard-related icons, but you may add new ones by extending the icons keyy of the theme. For example, if you want to add a new icon named my-icon you would override the theme and pass it again to the <ThemeProvider> component.

import { theme as defaultTheme } from 'pouncejs';

const myIcons = {
  'my-icon': {
    path: (
      <g id="collapse-table" stroke="none" fill="none">
        <rect x="0" y="0" width="24" height="24" />
      </g>
    ),
    viewBox: '0 0 24 24', // can be omitted if viewBox is `0 0 24 24` which is the default value
  },
};

const theme = {
  ...defaultTheme,
  icons: {
    ...defaultTheme.icons,
    ...myIcons,
  },
};

For typescript users, the new icons won't be available by default in the typings. To make them available, you need to create a declaration file anywhere in your project and extend the CustomIcons interface. For example:

// src/overrides.d.ts

import 'pouncejs';
import { myIcons } from '../myTheme'; // customIcons are declare in the snippet aoove

declare module 'pouncejs' {
  type MyIcons = typeof myIcons;
  export interface CustomIcons extends MyIcons {}
}

This way the my-icon value will be available in all Components that use icons.

SSR

SSR works out of the box with PounceJS. There's no need to add anything in your NextJS or custom-SSR app to enable it.

Performance

Pounce is on its beta phase right now, which means that the performance is constantly getting tuned.

If bundle size is something super crucial, you can safely import each module individually by doing import Box from 'pouncejs/dist/esm/components/Box' instead of the typical import { Box } from 'pouncejs' which will make sure to only pull what's needed for this particular component.

As it stands, it utilizes the latest @emotion/xxx @ 11.x.x internally, so if you are using a CSS-in-JS library in your project, it would be recommended to utilize the same library at a similar major version in order to not have two separate versions of a CSS-in-JS library in your project

License

Apache

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].