Search by

amir2mi / flatifycss

amir2mi

Modern flat design framework for the web, inspired by Duolingo design system.

Package info

github.com/ami-momo/flatifycss

Homepage

Language:MDX

pkg:composer/amir2mi/flatifycss

Statistics

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 71

Open Issues: 0

v2.0.1 2026-11-22 07:37 UTC

README

FlatifyCSS

FlatifyCSS

Modern flat design framework for the web, inspired by Duolingo design system.

Documentation   •   News   •   Issues   •   React components

npm version jsDelivr hits Packagist License: MIT

Getting started

You can use FlatifyCSS in several ways:

CDN

You can add FlatifyCSS using jsDelivr with these lines of code, @2 keeps you on the latest 2.x release:

<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/flatifycss@2/dist/css/flatify-min.css" rel="stylesheet" crossorigin="anonymous" />

<!-- JavaScript : Popperjs + FlatifyCSS -->
<script src="https://unpkg.com/@popperjs/core@2" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/flatifycss@2/dist/js/flatify-min.js" crossorigin="anonymous"></script>

Here is a whole page to start from:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Nunito:wght@400;600;700&display=swap" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/flatifycss@2/dist/css/flatify-min.css" rel="stylesheet" />
    <title>Hello FlatifyCSS</title>
  </head>
  <body class="container-md">
    <h1>Hello!</h1>
    <button class="button style-accent">It works</button>
  </body>
</html>

Package managers

You can include FlatifyCSS in your project using npm, Yarn, Bun or Composer:

npm install flatifycss
yarn add flatifycss
bun add flatifycss
composer require amir2mi/flatifycss

Then import the files you need, for example in a bundler:

import "flatifycss/dist/css/flatify-min.css";
import "flatifycss/dist/js/flatify-min.js";

Sass

The Sass source is in the /scss folder. Every variable uses !default, so you can change colors, fonts and sizes without touching the package files:

@use "flatifycss/scss/flatify" with (
  $ACCENT_COLOR: #8e44ad,
  $BORDER_RADIUS: 0.5em
);

All variables are listed on the customization page.

Contents

After installing FlatifyCSS or downloading the archive file, you'll find a /dist folder with compiled CSS, JS, and their map files:

CSS

Available CSS files:

  • flatify.css
  • flatify-min.css
  • flatify-noprefix.css
  • flatify-noprefix-min.css

The same files work for left to right and right to left pages, set dir="rtl" on <html>. The old flatify-rtl*.css files from version 1 are still there as copies, they will be removed in version 3.

JS

Note: FlatifyCSS needs Popperjs for dropdowns and popovers. This library isn't included in FlatifyCSS's JavaScript file, so you need to add it to your webpage separately. The JavaScript is only needed for interactive components, see the JavaScript page.

  • flatify.js
  • flatify-min.js

Dark mode

There is a %dark-mode Sass placeholder, and the compiled CSS can do it with a few CSS variables. Both ways are on the dark mode page.

React

Using React? React FlatifyCSS has the components ready, with TypeScript types.

Development

I use Bun for everything here.

  1. Run bun install in the root directory
  2. Run bun run build to compile the stylesheet and JavaScript file into /dist
  3. Run bun run watch while you work

After building, open examples/playground.html in your browser to try the components with the local CSS and JavaScript.

The documentation website is in /website, run bun install and bun start there. For more information about FlatifyCSS's Gulp tasks, read here.

Contributing

Found a bug or have an idea? Open an issue first, then pull requests are welcome. Please keep changes small and follow the code standards.

License

MIT