Design token framework — adopt a unified design language across platforms, codebases, and teams

Overview

Palette

Design tokens framework with atomic classes for React and Master CSS.

Deliver a consistent visual identity across your apps with design tokens, with your brand identity as code (BIaC) - from colors, typography, spacing or logos with your guidelines.

Features

  • Strongly typed end-to-end with TypeScript
  • First class React and Master CSS support
  • Minimal footprint: ~2KB with no dependencies
  • Production ready
  • Dynamic themes, switch on the fly

Usage

TSX Example

Tests

Palette is built with TypeScript and Bun, to run tests you need to run: bun wiptest

Development

Palette is developed in TypeScript and is published on npm, it uses the Bun runtime for development and tests, but can be used in projects designed for other runtimes.

You might also like...
 Bashly - Bash CLI Framework and Generator
Bashly - Bash CLI Framework and Generator

Bashly - Bash CLI Framework and Generator Create feature-rich bash scripts using simple YAML configuration

Black-box integration tests for your REST API using the Rust and its test framework

restest Black-box integration test for REST APIs in Rust. This crate provides the [assert_api] macro that allows to declaratively test, given a certai

CarLI is a framework for creating single-command and multi-command CLI applications in Rust

CarLI is a framework for creating single-command and multi-command CLI applications in Rust. The framework provides error and IO types better suited for the command line environment, especially in cases where unit testing is needed.

A lightweight, opinionated CQRS and event sourcing framework targeting serverless architectures.

cqrs A lightweight, opinionated CQRS and event sourcing framework targeting serverless architectures. Command Query Responsibility Segregation (CQRS)

Write Cross-platform application with React-like decralative UI framework and scalable ECS architecture all in Rust.

bevy_dioxus Dioxus Plugin for Bevy Write Cross-platform application with React-like decralative UI framework and scalable ECS architecture all in Rust

A minimal CLI framework written in Rust
A minimal CLI framework written in Rust

seahorse A minimal CLI framework written in Rust Features Easy to use No dependencies Typed flags(Bool, String, Int, Float) Documentation Here Usage T

CLI toolkit for GTD framework.
CLI toolkit for GTD framework.

GTDF_Crabby CLI toolkit for GTD framework. How to use crabby 0. Parameters Crabby is a CLI toolkit and gets parameters as input. All the main options

A strong, compile-time enforced authorization framework for rust applications.

DACquiri A compile-time enforced authorization framework for Rust applications. Authorization In typical applications, authorization checks are perfor

Framework for large distributed pipelines
Framework for large distributed pipelines

Rain Rain is an open-source distributed computational framework for processing of large-scale task-based pipelines. Rain aims to lower the entry barri

Comments
  • Feature Request: Mix macro formatting

    Feature Request: Mix macro formatting

    Preliminary checklist

    • [X] I understand that all communication must be in English
    • [X] I read the Documentation
    • [X] I read the Contributing guide
    • [X] I agree to follow the Code of Conduct
    • [X] I searched the issues and discussions but couldn't find anything (or linked relevant results below)

    Problem

    Currently the formatting is very verbose:

    mix! {
    	base: "bg:yellow",
    	variants: {
    		disabled: "bg:{} f:{} my:{}" => (
    			tokens.color("yellow"),
    			tokens.color("red"),
    			tokens.spacing("8")
    		),
    		bold: "f:bold"
    	},
    }
    

    The current implementation of the macro also doesn't cover the "base" field and also has no support for the "compounds" field.

    Solution

    The implementation should look something similar to this:

    mix! {
    	base: "bg:yellow",
    	variants: {
    		disabled: "bg:{tokens.color(yellow)} f:{tokens.color(red)} my:{tokens.spacing(8)}",
    		bold: "f:bold"
    	},
    	compounds: [
    		[{ label: "example", bold: true }, "bg:{tokens.color("red")}"],
    	]
    }
    

    Alternatives

    N/A

    Contribution

    No, I cannot contribute further

    Keywords

    mix, macro, formatting, variants, compounds

    kind/enhancement status/in-progress 
    opened by itsezc 6
Owner
Foretag
A collective open source group.
Foretag
A Rust curses library, supports Unix platforms and Windows

pancurses pancurses is a curses library for Rust that supports both Linux and Windows by abstracting away the backend that it uses (ncurses-rs and pdc

Ilkka Halila 353 Sep 24, 2022
Oxygen is a voice journal and audio analysis toolkit for people who want to change the way their voice comes across.

Oxygen Voice Journal Oxygen is a voice journal and audio analysis toolkit for people who want to change the way their voice comes across. Or rather, i

Jocelyn Stericker 30 Aug 30, 2022
Set Shell Environment Variables across multiple shells with a single configuration file.

Xshe – Cross-Shell Environment Vars xshe allows for setting Shell Environment Variables across multiple shells with a single TOML configuration file.

Ethan Kinnear 8 Sep 28, 2022
A slightly smart clipboard tool - leverage the filesystem to persist across machines after shutdown.

clipd A slightly smart clipboard using the filesystem under ~/.clipd to persist after shutdown. cowsay "clipd is great" | clipd copy clipd paste ____

null 5 Aug 9, 2022
Helps you keep track of time for team members across different time zones & DST changes

Teamdate Helps you keep track of time for team members across different timezones and other daylight saving changes based off their location. Because

Alex Snaps 5 Sep 16, 2022
Tool for audit and reclaim of delegated SPL Token accounts

Usage Install prerequisites System development libraries sudo apt install libssl-dev libudev-dev pkg-config gcc Rust curl --proto '=https' --tlsv1.2

Solana Foundation 4 Jan 27, 2022
An anchor CPI client for the SPL token lending program

anchor-lending anchor-lending is an anchor CPI client for any program that implements or extends the instruction interface found in the spl token lend

Rohan Kapur 10 May 18, 2022
An adaptation of the Solana token-swap program implementing Curve's StableSwap invariant.

StableSwap Program An adaptation of the Solana token-swap program implementing Curve's StableSwap invariant. Click here to try it out live on the Sola

smaster0517 3 Mar 30, 2022
A Twitch OAuth token revoker written in Rust.

Revoker - A Twitch OAuth Token Revoker Details Revoker is a small CLI tool written in Rust, made so you can easily and urgently remove a Twitch OAuth

Mykola 4 May 20, 2022