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

baka-core

v0.1.4-alpha.0

Published

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://baka-ui.com/logo-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://baka-ui.com/logo-light.svg"> <img alt="Shows the logo of the project. An origami followe

Downloads

10

Readme

A super dummy set of design system primitives

Getting started

Installation

  1. Install the ui package
npm install baka-ui
  1. Install the a design package
npm install baka-material-you

Usage

import { BakaButton } from "baka-ui";
import "baka-material-you/dist/index.css";

const App = () => <BakaButton>Click me</BakaButton>;

Features

BakaUI embraces a Less is more philosophy. It provides a set of design system primitives which can be used to build complex UIs by following simple guidelines. Here are some of the features of baka-ui you can utilize to build your Design System.

Composable

UI is composed from multiple atomic components to achieve more-complex designs.

<BakaTextField>
  <BakaLabel>Label</BakaLabel>
  <BakaInput />
  <BakaButton>
    <BakaIcon>search</BakaIcon>
  </BakaButton>
</BakaTextField>

Theming

Change the appearance of the components using themes & swatches by utilizing css & scss variables.

@use "baka-material-you" as material-you;
@use "baka-material-you/themes/dark" as dark-swatch;

:root {
  @include materila-you.styles();

  @media screen and (prefers-color-scheme: dark) {
    @include dark-swatch.design-styles();
  }
}

Tailwind Integration

BakaUI semlessly integrates with TailwindCSS by providing a preset which can be used to extend the default TailwindCSS configuration and provide costitent look & feel between component-level & layout styles.

// tailwind.config.js
module.exports = {
  // ...
  presets: [require("baka-material-you/tailwind")],
};

Typescript Support

Apply contextual typings according to your design system.

// The `variant` prop is typed according to the design system in use
<BakaButton variant={["filled", "icon"]}>Click me</BakaButton>

Principles

The baka-ui is built on top of basic design system principles which are followed strictly.

Modularity

Each design system is built by extracting common modules from it. For example, the baka-material-you design system exposes the following modules:

  • colors
  • typography
  • iconography
  • elevation
  • layout
  • motion

Atomic Composition

Each component renders a exactly one polymorphic element. UI is composed from multiple atomic components to achieve more-complex designs.

<BakaTextField>
  <BakaTextField>
  <BakaLabel>Label</BakaLabel>
  <BakaInput />
  <BakaButton>
    <BakaIcon>search</BakaIcon>
  </BakaButton>
</BakaTextField>

Variants

Each component has a set of variants which can be used to change the appearance of the component.

<BakaButton variant="filled">Click me</BakaButton>
<BakaButton variant="text">Click me</BakaButton>
<BakaButton variant="outlined">Click me</BakaButton>

Variants can be combined to create more complex components.

<BakaButton variant={["filled", "icon"]}>Click me</BakaButton>

States

Each component has a set of states which can be used to change the appearance of the component based on the state.

<BakaButton hovered={true}>Hovered</BakaButton>
<BakaButton selected={true}>Selected</BakaButton>
<BakaButton activated={true}>Pressed</BakaButton>