systemdesigndao / ton-design-system

Non official TON based Design System. Inspired by TON Brand Assets and Telegram Community Design System.
tonsite://design-system.ton
MIT License
45 stars 0 forks source link
dom frontend lightweight lightweight-dom-operations minimalism patterns-ts tailwindcss typescript vanilla-typescript

Telegram System Design DAO Forum

TON Design System

https://ton.org/en/brand-assets

Package size

Package raw size

Repository size

GitHub repo size

Main idea

Atomic CSS

.atom {
  @apply ... (tw-classes)
}

Usage

Atomic Components using Declarative components with Raw Framework

import { tags } from './package/raw'

const { div, button } = tags;

export const Button = () => {
  return (
    div(
      { className='px-2 py-2 h-full flex' }, 
      button(
        { class: "custom-classname", variant="default" }, 
        'Cross-platform button (default)'
      )
    );
};

More examples

Screenshot

Use CLI

Quick start

  1. Copy component from Github - npx "@designervoid/ton-design-system"@"latest" cli -g
  2. Init Tailwind npx "@designervoid/ton-design-system"@"latest" cli -t
  3. Init TDS npx "@designervoid/ton-design-system"@"latest" cli -tds

License

MIT