GithubHelp home page GithubHelp logo

timmybytes / rational-design Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 11.92 MB

A tool for creating ratio-based style systems built in React.

Home Page: https://timmybytes.github.io/rational-design/

License: MIT License

HTML 9.34% JavaScript 54.81% SCSS 35.85%
font-size react scss responsive-design

rational-design's Introduction

Rational Design Logo

GitHub last commit
A tool for ratio-based design

Built with ❤︎ by Timothy Merritt

Rational Design is a tool for generating type-scales for greater consistency in design systems or web design projects. It’s built with React Hooks, SCSS, Webpack, and npm scripts, and is fully responsive.

About

Design systems often use a set mathematical ratio in how elements of different sizes relate to one another, particularly with the use of type. Rational Design let's you demo various type scales based on classical geometric and musical ratios. These scales can then be applied to your own projects via a CSS, SCSS, or JSON copy-to-clipboard function, ensuring your project has an underlying guide for scaling consistency.

Usage

Web App

Use the live web app to create a ratio-based type scale. You can click the info button in the app for more details. Play around with the settings to generate different scales.

Rational Design - Info button display

Select a ratio

Choose a ratio from the dropdown menu to define the increments of your scale. The ratios included come from musical-based ratios, as well as Orthagon ratios. You can read more about using ratios in your layouts and designs here.

Rational Design - Ratio

Rational Design - ratios

Choose a base size

Choose a base font size (in pixels). The rest of your scale will be calculated starting from this number by applying your chosen ratio to each increment.

Rational Design - base size

Choose a scale

The scale determines how many ratio increments the app should output. The default is 3, but you can go up to 99.

Rational Design - scale

Chose colors

A color chooser is incorporated into Rational Design as well. Use the color pairings to see your type scale in different color contrasts.

Rational Design - color palette display

Copy your type scale

The settings you create can be copied as SCSS, CSS, or JSON data, and pasted right into your project. You can use the resulting increments as a system for consistency in your projects:

Rational Design - copy button

Copied settings as SCSS variables
// Color Variables
$foreground: #444444;
$background: #8bbbff;

// Type-Scale Variables
$base-font-size: 12px;
$ratio: 1.118;
$size-1: 12px;
$size-2: 13.42px;
$size-3: 15px;

Hide settings

You can also hide the settings panel altogether by clicking the hide button.

Rational Design - hide settings


Local Development

To run and configure locally, follow these steps:

Fork and Clone Repo

Fork and clone the repo to your local machine:

git clone https://github.com/timmybytes/rational-design.git

cd into the repo, and install dependencies:

cd rational-design/
npm install

Development

To start a development environment:

npm start

Contributing

Feel free to submit a pull request if you want to add features or changes.

License

Rational Design is available under the MIT license.

rational-design's People

Contributors

dependabot[bot] avatar timmybytes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

rational-design's Issues

Increase contrast on dropdown menus

Is your feature request related to a problem? Please describe.
Dropdown menu panels in the SettingsPane are too chromatically similar between background and foreground.

Describe the solution you'd like
The background should be set to the primary app blue, with the foreground set to black.

Describe alternatives you've considered

Additional context

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.