All Projects β†’ One-Nexus β†’ Synergy

One-Nexus / Synergy

Licence: mit
Synergy is a framework for building modular, configurable and scalable UI components for React-DOM projects

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Synergy

Bemify
Sass Mixins to write BEM-style SCSS source
Stars: ✭ 149 (+2.05%)
Mutual labels:  sass, bem, sass-mixins
Sassyfication
πŸ’…Library with sass mixins to speed up your css workflow.
Stars: ✭ 51 (-65.07%)
Mutual labels:  sass, sass-mixins
Spinners
A Sass mixin to generate fully customizable, pure CSS3 loading/busy indicators
Stars: ✭ 33 (-77.4%)
Mutual labels:  sass, sass-mixins
Bourbon
Bourbon is maintained by the thoughtbot design team. It is funded by thoughtbot, inc. and the names and logos for thoughtbot are trademarks of thoughtbot, inc.
Stars: ✭ 9,065 (+6108.9%)
Mutual labels:  sass, sass-mixins
Tentcss
🌿 A CSS survival kit. Includes only the essentials to make camp.
Stars: ✭ 400 (+173.97%)
Mutual labels:  sass, bem
Avalanche
Superclean, powerful, responsive, Sass-based, BEM-syntax CSS grid system
Stars: ✭ 627 (+329.45%)
Mutual labels:  sass, bem
Bemskel
A lightweight CSS framework written in BEM and SASS for building scalable component-based user interfaces
Stars: ✭ 89 (-39.04%)
Mutual labels:  sass, bem
Pug Starter
Simple pug (jade) starter [framework] enabling faster delivery of HTML & CSS projects to a private server and/or automatic deployment of GitHub pages.
Stars: ✭ 328 (+124.66%)
Mutual labels:  sass, bem
Frontie Webpack
Front-end Boilerplate | Gulp 4 + Webpack 4 + Babel + ITCSS Architecture + BEM Methodology + Twig.js
Stars: ✭ 102 (-30.14%)
Mutual labels:  sass, bem
Atoms
Atoms for Blaze UI
Stars: ✭ 1,505 (+930.82%)
Mutual labels:  sass, bem
Column Setter
Custom responsive grids in Sass that work in older browsers.
Stars: ✭ 117 (-19.86%)
Mutual labels:  sass, sass-mixins
Bem React
A set of tools for developing user interfaces using the BEM methodology in React
Stars: ✭ 382 (+161.64%)
Mutual labels:  react-components, bem
Gulp Scss Starter
Frontend development with pleasure. SCSS version
Stars: ✭ 339 (+132.19%)
Mutual labels:  sass, bem
Sassmagic
Collection best of Sass mixins and function
Stars: ✭ 795 (+444.52%)
Mutual labels:  sass, sass-mixins
Breakpoint Slicer
Slice media queries with ease
Stars: ✭ 332 (+127.4%)
Mutual labels:  sass, sass-mixins
Webpack Es6 Sass Setup
A basic setup for Webpack with ES6, Babel, Sass and stylelint
Stars: ✭ 63 (-56.85%)
Mutual labels:  sass, bem
Sscss
Light Sass lib for managing your font-size, margin, padding, and position values across breakpoints.
Stars: ✭ 119 (-18.49%)
Mutual labels:  sass, sass-mixins
Sass Deprecate
Let Sass warn you about the pieces of your UI that are deprecated, providing a clear upgrade path for developers
Stars: ✭ 265 (+81.51%)
Mutual labels:  sass, sass-mixins
Juice
Mixins for Life
Stars: ✭ 274 (+87.67%)
Mutual labels:  sass, sass-mixins
Kanbasu
A lightweight CSS framework written in Sass.
Stars: ✭ 94 (-35.62%)
Mutual labels:  sass, bem

GitHub license Build status npm version npm downloads

Synergy is a framework for building modular, configurable and scalable UI components for React-DOM projects

Features
  • Style Modules using either Sass or JavaScript
  • Make cosmetic UI updates to your app without modifying source code (learn more)
  • Easily configure modules and create themes for your app
  • Ideal for creating presentational React components
  • ...for use with Component Libraries/UI Styleguides/Design Systems
Useful Wiki Pages
Boilerplates
Synergy Boilerplate (Javascript Styles) Synergy Boilerplate (Sass Styles)

60 Second Accordion From Scratch

npm install --save react react-dom @onenexus/synergy;

View a live demo of this example in CodeSandbox

accordion.jsx
import React, { useState } from 'react';
import { Module, Component } from '@onenexus/synergy';

const styles = {
  fontFamily: 'sans-serif',

  heading: ({ context }) => ({
    backgroundColor: '#1E90FF',
    color: 'white',
    padding: '1em',
    cursor: 'pointer',
    
    ...(context.panel.open && {
      backgroundColor: '#00FFB2'
    }),

    ':hover': {
      backgroundColor: '#01BFFF'
    }
  }),

  content: ({ context }) => ({
    padding: '1em',
    color: '#444444',
    display: context.panel.open ? 'block' : 'none'
  })
}

const Accordion = ({ panels, ...props }) => {
  const [current, toggle] = useState(0);

  return (
    <Module name='Accordion' styles={styles} { ...props }>
      {panels.map(({ heading, content }, i) => (
        <Component name='panel' open={i === current}>
          <Component name='heading' onClick={() => toggle(i === current ? -1 : i)}>
            {heading}
          </Component>
          <Component name='content' content={content} />
        </Component>
      ))}
    </Module>
  );
}

export default Accordion;
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import Accordion from './accordion.jsx';

const data = [
  {
    heading: 'accordion heading 1',
    content: 'lorem ipsum'
  },
  {
    heading: 'accordion heading 2',
    content: <p>foo bar</p>
  }
];

const Screen = () => (
  <Accordion panels={data} />
);

ReactDOM.render(<Screen />, document.getElementById('app'));

This example is short and concise for demo purposes; for a more complete example utilising more features see the Creating a Module page


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].