Giter VIP home page Giter VIP logo

design-system's Introduction

Design System ๐Ÿฅ

A small, opinionated CSS framework to make sites look alright with minimal effort

Netlify Status

โš ๏ธ Work in progress. Things are most certainly incomplete and/or broken, and will definitely change.

  • ๐Ÿ”ฅ Embraces semantic HTML to make native elements look great out of the box, without classes
  • ๐Ÿ˜Ž Small set of utilities for additional states and convenience
  • ๐Ÿ› Tiny footprint with no runtime dependencies or build step required
  • ๐ŸŒˆ Automatic color system that reduces time spent fiddling with color palettes
  • ๐Ÿช— Fully responsive

Installation

From a CDN:

@import url("https://esm.sh/gh/andreasphil/[email protected]/dist/index.min.css")
layer(theme);
import { useThemeColor } from "https://esm.sh/gh/andreasphil/[email protected]";

With a package manager:

npm install github:andreasphil/design-system#<tag>

Usage

Find the demo at https://design-system.a13i.dev.

First, import the CSS. I recommend using layers to avoid conflicts and to avoid specificity chaos when customizing.

@import "@andreasphil/design-system/style.css" layer(theme);

@layer theme {
  /* You can add customizations and override variables here. */
}

Automatic theme color

There is a helper that will manage the theme color for light and dark mode automatically:

import { useThemeColor } from "@andreasphil/design-system";

const { unsubscribe } = useThemeColor();

// Call when you want to stop automatic theme color management
unsubscribe();

Development

Design System is built with Lightning CSS. Packages are managed by pnpm. The following commands are available:

pnpm dev          # Compile stylesheets in watch mode
pnpm build        # Bundle for production

For a demo, open index.html in a browser.

Deployment

Deployment should work out of the box when linking the repository to a project on Netlify.

Credits

This library uses a number of open source packages listed in package.json. Icons are from Lucide. It was inspired by Pico.css.

Thanks ๐Ÿ™

design-system's People

Contributors

andreasphil avatar

Stargazers

 avatar Jrson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.