All Projects → CRED-CLUB → Synth Ios

CRED-CLUB / Synth Ios

Licence: apache-2.0
Synth is CRED's inbuilt library for using Neumorphic components in your app.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Synth Ios

Teensy Eurorack
Eurorack shield for teensy 4.1 with 14 in / 16 out analog channels
Stars: ✭ 99 (-76.65%)
Mutual labels:  synth, design
Synth Android
Synth is CRED's inbuilt library for using Neumorphic components in your app.
Stars: ✭ 468 (+10.38%)
Mutual labels:  synth, design
Theme Ui
Build consistent, themeable React apps based on constraint-based design principles
Stars: ✭ 4,150 (+878.77%)
Mutual labels:  design
Playroom
Design with JSX, powered by your own component library.
Stars: ✭ 4,033 (+851.18%)
Mutual labels:  design
Alva
Create living prototypes with code components.
Stars: ✭ 3,734 (+780.66%)
Mutual labels:  design
Jdl Studio
JDL Studio is an online JHipster Domain Language visual editor
Stars: ✭ 365 (-13.92%)
Mutual labels:  design
Web Skills
A visual overview of useful skills to learn as a web developer
Stars: ✭ 5,107 (+1104.48%)
Mutual labels:  design
Aestheticdialogs
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (-16.98%)
Mutual labels:  design
Pts
A library for visualization and creative-coding
Stars: ✭ 4,628 (+991.51%)
Mutual labels:  design
Penpot
Penpot - The Open-Source design & prototyping platform
Stars: ✭ 6,343 (+1395.99%)
Mutual labels:  design
Dx7 Supercollider
My accurate Yamaha DX-7 clone. Programmed in Supercollider.
Stars: ✭ 395 (-6.84%)
Mutual labels:  synth
Theme Specification
A specification for defining theme objects & design tokens for use with UI components
Stars: ✭ 374 (-11.79%)
Mutual labels:  design
Webdevscom
😍 All kinds of resources for Developers 🔱 in one place.
Stars: ✭ 364 (-14.15%)
Mutual labels:  design
Material Framework
[Unmaintained] An easy to use material design based framework.
Stars: ✭ 383 (-9.67%)
Mutual labels:  design
Shards Dashboard Vue
A free Vue admin dashboard template pack featuring a modern design system and lots of custom templates and components.
Stars: ✭ 363 (-14.39%)
Mutual labels:  design
Greyprint
Templates with pre-made styles to assist icon, symbol, and glyph design.
Stars: ✭ 403 (-4.95%)
Mutual labels:  design
Figma Graphql
The reimagined Figma API (super)powered by GraphQL
Stars: ✭ 354 (-16.51%)
Mutual labels:  design
Neumorphism
Try to Neumorphism in Android (Just experimental!! 🧪)
Stars: ✭ 365 (-13.92%)
Mutual labels:  design
Elementor
The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
Stars: ✭ 4,207 (+892.22%)
Mutual labels:  design
Awesome Web Desktops
Websites, web apps, portfolios which look like desktop graphical user interfaces
Stars: ✭ 420 (-0.94%)
Mutual labels:  design

Synth

Synth is CRED's inbuilt library for using Neumorphic components in your app.

What really is Neumorphism? It's an impressionistic style, playing with light, shadow, and depth to create a digital experience inspired by the physical world. That's the definition anyway. Our recommendation is you try it out to see what you make of it. If you do create something with Synth, let us know. We're excited to see where you take it.

A note for the curious: if you wish to learn more about Synth, we have a post detailing the concept and CRED's philosophy behind it here.

For Android, checkout Synth-Android

Banner

Installation

It can be easily integrated with Cocoapods. Add this line to your podfile:

pod 'synth-ios'

Requirements

  • iOS 11.0+
  • Swift 5.1+

Usage

Embossed and Debossed views

Embossed and Debossed Views

As it provides an extension over UIView, you can call it over any UI element

let embossedView = UIView()
embossedView.applyNeuStyle()

calling applyNeuStyle on any view will give default embossed effect. There is also a helper function getDebossModel() in NeuUIHelper which provides debossed effect.

let debossedView = UIView()
debossedView.applyNeuStyle(model: NeuUIHelper.getDebossModel())

applyNeuStyle arguments

attribute description value
model struct which lets you configure base color, shadow direction and shadow offsets NeuViewModel
showOnlyShadows enabling this will only render outer or inner shadows skipping the solid background part Bool

NeuViewModel attributes

all colors are by default derived from base color. You can explictly pass different values when needed.

attribute description value
baseColor base color based on which background and borders are rendered UIColor
bgGradientColors colors array which renders background [UIColor]
borderGradientColors colors array which renders borders [UIColor]
borderGradientWidth outer border width CGFloat
lightDirection an enum which lets define light direction NeuLightDirection
shadowType an enum which lets define shadow type, outer or inner NeuShadowType
lightShadowModel a model to customise shadow offsets of top shadow NeuShadowModel
darkShadowModel a model to customise shadow offsets of bottom shadow NeuShadowModel
blurAmount amount of guassian blur that has to be applied CGFloat
hideLightShadow hides top shadow Bool
hideDarkShadow hides bottom shadow Bool
hideBorder hides outer border Bool

Buttons

There are by default four styles which can be applied over UIButton:

elevatedSoft // an embossed button
elevatedSoftRound // a round embossed button
elevatedFlat // flat button
elevatedFlatRound // flat round button

Elevated soft button

Elevated Soft Button

let softButton = UIButton()
softButton.applyNeuBtnStyle(type: .elevatedSoft, title: "Idle")

Elevated soft round button

Elevated soft round Button

let roundButton = UIButton()
roundButton.applyNeuBtnStyle(type: .elevatedSoftRound, image: UIImage(named: "plus"))

Elevated flat button

Elevated Flat Button

Elevated flat button renders a flat surface on top of the elevated neumorphic platform. this flat surface can be customized in two ways:

let flatButton = UIButton()
flatButton.applyNeuBtnStyle(type: .elevatedFlat, title: "Idle")

Drawable Button

you can also add an image aligned left to this image. synth will render a neumorphic pit on which the image is rendered.

softButton.applyNeuBtnStyle(type: .elevatedSoft, title: "Idle", image: UIImage(named: "plus"), imageDimension: 12)
softButton.applyNeuBtnStyle(type: .elevatedFlat, title: "Idle", image: UIImage(named: "plus"), imageDimension: 12)

This button is made up of three layers baseModel, innerModel and buttonContentModel named from bottom to top. NeuButtonCustomModel allows you to configure each of these layers and design button.

import Synth

let model = NeuConstants.NeuButtonCustomModel()
... some configuration
let customButton = UIButton()
customButton.applyNeuBtnStyle(customModel: model, title: "Custom Button")

This library works over base color concept and derives light and dark colors from base color itself. All views and buttons will be using this color to design neumorphic elements. This base color can be set at app start. Similarly, text attributes can be applied at an app-level to give default style to all neumorphic buttons.

NeuUtils.baseColor = UIColor.red

let textAttributes: [NSAttributedString.Key:Any] = [:]
textAttributes[.foregroundColor] = .black
NeuUtils.textAttributes = textAttributes

Contributing

Pull requests are welcome! We'd love help improving this library. Feel free to browse through open issues to look for things that need work. If you have a feature request or bug, please open a new issue so we can track it.

Contributors

Synth would not have been possible if not for the contributions made by CRED's design and frontend teams.

License

Copyright 2020 Dreamplug Technologies Private Limited.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].