• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A JavaScript library of Web Components following Spectrum design patterns.

Checkout Spectrum Web Components which is a future-looking project to develop Adobe Spectrum design language based around web components, ES-Modules, and modern browser standards.

Coral Spectrum Build Status

A JavaScript library of Web Components following Spectrum design patterns.

Important

Please follow the Commit Message Conventions. To easily comply, it is recommended to use cz-cli.

Showcase

Component Examples

To see all components in action. These are only examples and don't cover all scenarios.

API References

Covers the API for all components including properties, events and more.

Playground

Experiment and preview code with the latest Coral Spectrum version. Code can be shared by copy pasting the URL. The playground is sandboxed to prevent security risks.

Spectrum

The current default theme is is an implementation of the Spectrum design specifications, Adobe’s design system. Spectrum provides elements and tools to help product teams work more efficiently, and to make Adobe’s applications more cohesive.

Coral Spectrum leverages the Spectrum CSS framework to style components including the Spectrum SVG icons.

Angular, React, Vue.js compatibility

Our vision is to create consistent Adobe experiences by providing a complete, easy to use library of HTML components compatible with major frameworks.

To reach the goal, Coral Spectrum derives from Custom Elements v1 with native support thanks to broad collaboration between browser vendors. The use of custom elements gives us the ability to hide many implementation details from the consumer, allowing much more freedom to change the underlying markup that supports those elements. This makes the exposed API smaller and more explicit, resulting in a lower risk of updates to Coral Spectrum needing to introduce breaking changes.

Browser support

Coral Spectrum is designed to support the following browsers:

  • Chrome (latest)
  • Safari (latest)
  • Firefox (latest)
  • Edge (latest)
  • IE 11
  • iOS 7+
  • Android 4.4+

Theme (light, dark, lightest, darkest)

The default Coral Spectrum styles cascade from coral--light, coral--lightest, coral--dark and coral--darkest theme, so that class must be specified at a higher level.

<body class="coral--light">
    <!-- light theme -->
    <div class="container"></div>
    <div class="coral--dark">
        <!-- dark theme -->
    </div>
</body>

Large scale support

For mobile, Spectrum has a larger scale that enables larger tap targets on all controls. To enable it, the class coral--large must be specified at a higher level.

<body class="coral--light coral--large">
   <!-- light theme -->
   <!-- large scale -->
</body>

Built-in Accessibility and Keyboard support

Having an inaccessible application can mean thousands of dollars of fines if you land a government contract. It also means alienating an entire segment of society by making your application completely unusable to them. To help you avoid this, we’ve made it a rule that every Coral Spectrum component should be accessible.

Internationalization support

Coral Spectrum provides a robust internal system for internationalization of its strings. This is done via an internal Adobe process.

Supported languages are :

Language family Language tag Language variant
English en-US American English
French fr-FR Standard French
German de-DE Standard German
Italian it-IT Standard Italian
Spanish es-ES Castilian Spanish
Portuguese pt-BR Brazilian Portuguese
Japanese ja-JP Standard Japanese
Korean ko-KR Standard Korean
Chinese zh-CN Mainland China, simplified characters
Chinese zh-TW Taiwan, traditional characters
Dutch nl-NL Netherlands Dutch
Danish da-DK Standard Danish
Finnish fi-FI Standard Finnish
Norwegian no-NO Standard Norwegian
Swedish sv-SE Standard Swedish
Czech cs-CZ Standard Czech
Polish pl-PL Standard Polish
Russian ru-RU Standard Russian
Turkish tr-TR Standard Turkish

Using Coral Spectrum

Easiest way via a CDN

The easiest way to consume Coral Spectrum is to use a CDN e.g. copy these lines into your html file.

<head>
  <!-- 4.x.x means latest major 4 version release, adjust version if you need a specific one -->
  <link rel="stylesheet" href="https://unpkg.com/@adobe/[email protected]/dist/css/coral.min.css">
  <script src="https://unpkg.com/@adobe/[email protected]/dist/js/coral.min.js" data-coral-icons-external="js"></script>
</head>
<body class="coral--light">
  <button is="coral-button" icon="add">My Button</button>
</body>

Copying the distribution files

You can download a packaged/published version of @adobe/coral-spectrum from npm:

npm pack @adobe/coral-spectrum

After you've unzipped the downloaded package, look for the dist folder and :

  • Copy the files from dist/css, dist/js and dist/resources in your project.
  • Reference the files in your page e.g
<link rel="stylesheet" href="css/coral.min.css">
<script src="js/coral.min.js"></script>

Including entire library with a bundler like parcel

npm install @adobe/coral-spectrum

then in your main js, use:

require("@adobe/coral-spectrum/dist/js/coral.js");
require("@adobe/coral-spectrum/dist/css/coral.css");

Including only the components you need

If your project only requires a few components, you can use a module bundler like Webpack to only import the components needed. Below is an example of a Webpack config:

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');

module.exports = {
  mode: 'production',
  devtool: 'source-map',
  entry: './src/index.js',
  output: {
    filename: 'bundle.min.js',
    path: path.resolve(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env']
          }
        }
      },
      {
        test: /\.svg$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: 'icons/[name].[ext]'
            },
          },
        ]
      },
      {
        test: /\.css$/,
        use: [MiniCssExtractPlugin.loader, 'css-loader']
      }
    ]
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: 'style.min.css'
    }),
    new OptimizeCssAssetsPlugin({
      assetNameRegExp: /style\.min\.css$/g,
      cssProcessor: require('cssnano'),
      cssProcessorPluginOptions: {
        preset: ['default', { discardComments: { removeAll: true } }],
      }
    })
  ]
};

Then in your index.js file, you can import and use single components :

// Import Component
import {Button} from '@adobe/coral-spectrum/coral-component-button';

const button = new Button();

If icons are not displayed, ensure the path to the styles and icons are set e.g. :

<link rel="stylesheet" href="dist/style.min.css">
<script data-coral-icons="dist/icons/" src="dist/bundle.min.js"></script>

If icons still do not display, you can try setting them to display as inline SVGs, instead of external resources. Coral Spectrum will default to external resources on browsers other than IE11. Using the previous example, this option can be set with:

<link rel="stylesheet" href="dist/style.min.css">
<script data-coral-icons="dist/icons/" data-coral-icons-external="off" src="dist/bundle.min.js"></script>

Note: Calendar, Clock and Datepicker components will leverage moment.js if available.

Contributing

Check out the contributing guidelines.

Building and Testing

Run the following commands first :

npm install -g gulp-cli
npm install

You can use below tasks to get started:

  • gulp to generate the build in the dist folder and run the dev server on localhost:9001 by default.
  • gulp build to generate the build in the dist folder.
  • gulp dev to run the dev server on localhost:9001 by default.
  • gulp test to run the tests. Test reports are in dist/coverage.
  • gulp docs to build the documentation in dist/documentation.
  • gulp axe to run the accessibility checks.

Each component can be built independently e.g. cd coral-component-button && gulp.

Releasing

Automatic release:

Merging the PR to master will trigger an automatic release Github Action. It is important to follow Angular Commit Message Conventions. It is recommended to use cz-cli for easy commits. Only fix and feat can trigger a release. If you want to skip release add [skip release] or [release skip] to the commit message

Manual releasing:

We are currently releasing this package on npm.

Before we get started, clean up your dependencies with the following command :

git checkout master
rm -rf node_modules && npm install

Then run gulp release. You'll be asked to bump the version (minor version bump by default). Coral Spectrum is following semantic versioning (either patch, minor or major).

The command will take care of increasing, tagging the version and publishing the package to npm.

If everything went well, run gulp deploy to publish the documentation on the gh-pages branch else revert the version bump.

More Repositories

1

brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
JavaScript
33,258
star
2

react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
TypeScript
12,850
star
3

leonardo

Generate colors based on a desired contrast ratio
JavaScript
1,952
star
4

antialiased-cnns

pip install antialiased-cnns to improve stability and accuracy
Python
1,611
star
5

balance-text

A plugin for implementing balancing of wrapping text in a web page
JavaScript
1,362
star
6

adobe.github.com

Adobe central hub for open source
CSS
1,290
star
7

spectrum-web-components

Spectrum Web Components
TypeScript
1,267
star
8

spectrum-css

The standard CSS implementation of the Spectrum design language.
CSS
1,196
star
9

brackets-shell

CEF3-based application shell for Brackets.
Python
1,176
star
10

aem-core-wcm-components

Standardized components to build websites with AEM.
Java
741
star
11

S3Mock

A simple mock implementation of the AWS S3 API startable as Docker image, TestContainer, JUnit 4 rule, JUnit Jupiter extension or TestNG listener
Java
699
star
12

jsonschema2md

Convert Complex JSON Schemas into Markdown Documentation
JavaScript
594
star
13

NLP-Cube

Natural Language Processing Pipeline - Sentence Splitting, Tokenization, Lemmatization, Part-of-speech Tagging and Dependency Parsing
HTML
551
star
14

aem-project-archetype

Maven template to create best-practice websites on AEM.
JavaScript
544
star
15

ferrum

Features from the rust language in javascript: Provides Traits/Type classes & a hashing infrastructure and an advanced library for working with sequences/iterators in js
JavaScript
496
star
16

cryptr

Cryptr: a GUI for Hashicorp's Vault
HTML
495
star
17

brackets-app

Deprecated CEF1-based app shell for Brackets. Use https://github.com/adobe/brackets-shell instead.
C++
490
star
18

cssfilterlab

CSS FilterLab
JavaScript
348
star
19

hyde

A front-end to Jekyll that parses C++ sources to produce and enforce out-of-line documentation
C++
303
star
20

htl-spec

HTML Template Language Specification
280
star
21

node-smb-server

A 100% JavaScript implementation of the SMB file sharing protocol.
JavaScript
276
star
22

lit-mobx

Mixin and base class for using mobx with lit-element
TypeScript
268
star
23

aem-guides-wknd

Tutorial Code companion for Getting Started Developing with AEM Sites WKND Tutorial
JavaScript
261
star
24

xdm

Experience Data Model
JavaScript
245
star
25

lagrange

A Robust Geometry Processing Library
C++
215
star
26

webkit

Experiments and contributions to WebKit. Tracks git://git.webkit.org/WebKit.git
213
star
27

chromium

Experiments and contributions to Chromium project
C++
207
star
28

elixir-styler

An @elixir-lang code-style enforcer that will just FIFY instead of complaining
Elixir
207
star
29

avmplus

Source code for the Actionscript virtual machine
ActionScript
194
star
30

ops-cli

Ops - cli wrapper for Terraform, Ansible, Helmfile and SSH for cloud automation
Python
186
star
31

rules_gitops

This repository contains rules for continuous, GitOps driven Kubernetes deployments.
Starlark
168
star
32

Deep-Audio-Prior

Audio Source Separation Without Any Training Data.
Python
156
star
33

pdf-embed-api-samples

Samples for Adobe Document Services PDF Embed API
JavaScript
155
star
34

svg-native-viewer

SVG Native viewer is a library that parses and renders SVG Native documents
C++
152
star
35

aem-htl-repl

Read–Eval–Print Loop environment for HTL.
JavaScript
152
star
36

OSAS

One Stop Anomaly Shop: Anomaly detection using two-phase approach: (a) pre-labeling using statistics, Natural Language Processing and static rules; (b) anomaly scoring using supervised and unsupervised machine learning.
Python
150
star
37

stringlifier

Stringlifier is on Opensource ML Library for detecting random strings in raw text. It can be used in sanitising logs, detecting accidentally exposed credentials and as a pre-processing step in unsupervised ML-based analysis of application text data.
Python
148
star
38

Spry

Spry is a JavaScript-based framework that enables the rapid development of Ajax-powered web pages.
HTML
140
star
39

XMP-Toolkit-SDK

The XMP Toolkit allows you to integrate XMP functionality into your product or solution
C++
135
star
40

himl

A hierarchical yaml config in Python
Python
118
star
41

aem-boilerplate

Use this repository template for new AEM projects.
JavaScript
118
star
42

adobe-client-data-layer

An event-driven store for all trackable data of your site.
JavaScript
114
star
43

brackets-phonegap

A brackets extension for PhoneGap development.
JavaScript
112
star
44

aem-component-generator

AEM Component Generator is a java project that enables developers to generate the base structure of an AEM component using a JSON configuration file specifying component and dialog properties and other configuration options.
Java
111
star
45

brackets.io

brackets.io website
HTML
111
star
46

tf-manage

Shell
110
star
47

GLS3D

An implementation of OpenGL for Stage3D that can run inside Flash Player 11+
C
105
star
48

aem-core-cif-components

A set of configurations and components to get you started with AEM Commerce development
Java
103
star
49

react-webcomponent

This projects automates the wrapping of a React component in a CustomElement.
JavaScript
95
star
50

ride

REST API Automation framework for functional, integration, fuzzing, and performance testing
Java
93
star
51

alloy

Alloy is the web SDK for the Adobe Experience Platform.
JavaScript
92
star
52

spectrum-tokens

Tokens used by Spectrum, Adobe's design system.
JavaScript
90
star
53

web-platform

JavaScript
90
star
54

asset-share-commons

A modern, open-source asset share reference implementation built on Adobe Experience Manager (AEM)
Java
88
star
55

experience-platform-postman-samples

83
star
56

go-starter

Bootstrap a new project from a template.
Go
83
star
57

orc

ORC is a tool for finding violations of C++'s One Definition Rule on the OSX toolchain.
C++
79
star
58

pdfservices-node-sdk-samples

Samples for the Adobe Document Services PDF Tools Node SDK
HTML
77
star
59

sbmc

Sample-based Monte Carlo Denoising using a Kernel-Splatting Network [Siggraph 2019]
Python
76
star
60

git-server

A GitHub Protocol & API emulation
JavaScript
75
star
61

aio-theme

The Adobe I/O theme for building markdown powered sites
JavaScript
72
star
62

aem-guides-wknd-spa

71
star
63

aem-sample-we-retail-journal

We.Retail Journal is a sample showcasing SPA Editing capabilities in AEM using React and Angular
CSS
70
star
64

frontend-regression-validator

Visual regression tool used to compare baseline and updated instances of a website in a deployment pipeline.
Python
67
star
65

blackhole

An HTTP sink (for testing) with optional recording and playback ability
Go
65
star
66

react-spectrum-charts

Build compelling visualizations using declarative react components.
TypeScript
61
star
67

aem-spa-project-archetype

Maven Archetype for creating new AEM SPA projects
CSS
61
star
68

aio-cli

Adobe I/O Extensible CLI
JavaScript
60
star
69

aem-react-editable-components

SPA React Editable Components for Adobe Experience Manager
TypeScript
60
star
70

aem-upload

Makes uploading to AEM easier, and can be used as a command line executable or required as a Node.js module.
JavaScript
60
star
71

dds2atf

Tool for converting DDS files into ATF files suitable for use with the Flash Stage3D API
C++
58
star
72

redux-saga-promise

Create actions that return promises, which are resolved/rejected by a redux saga
JavaScript
58
star
73

aem-modernize-tools

A suite of tools to modernize your AEM Sites implementations off legacy features.
Java
58
star
74

adobe-photoshop-api-sdk

Adobe Photoshop API SDK
JavaScript
57
star
75

helix-home

The home of Project Helix
HTML
54
star
76

xmp-docs

XMP documentation
52
star
77

aem-testing-clients

Testing tools for Adobe Experience Manager
Java
51
star
78

aem-brackets-extension

Brackets extension for Adobe Experience Manager (AEM) front-end developers with auto-sync and HTL support.
JavaScript
51
star
79

aem-enablement

Content required for AEM Enablement
Java
50
star
80

brackets-edge-web-fonts

Edge Web Fonts extension for Brackets. Simply unzip and drop into your Brackets extension folder to browse and include Edge Web Fonts.
JavaScript
50
star
81

helix-cli

Command-line tools for developing with AEM
JavaScript
49
star
82

aem-guides-wknd-graphql

JavaScript
49
star
83

brackets-registry

A registry system for hosting Brackets extensions powered by node.js
JavaScript
46
star
84

htlengine

An HTL (Sightly) Interpreter/Compiler for Node.js
HTML
45
star
85

aem-dispatcher-experiments

Experiments to demonstrate the impact of the Dispatcher and it's configuration parameters.
HTML
44
star
86

pdfservices-python-sdk-samples

Adobe PDFServices python SDK Samples
Python
44
star
87

commerce-cif-connector

AEM Commerce connector for Magento and GraphQL
Java
43
star
88

node-fetch-retry

Node Module for performing retries using node-fetch
JavaScript
42
star
89

aem-react-core-wcm-components

41
star
90

behavior_tree_editor

A visual editor for building behavior trees for the bots
JavaScript
41
star
91

libLOL

Python
40
star
92

starter-repo

Documentation templates for use in open source and open development projects
40
star
93

commerce-cif-magento

Adobe Commerce Integration Framework (CIF) Magento Integration
JavaScript
40
star
94

aem-cif-guides-venia

AEM CIF Venia Project
JavaScript
39
star
95

bin2c

Convert to/Embed binary files in C source files, quickly and efficiently.
C
38
star
96

aem-site-template-standard

Basic site template for AEM that allows non-Java experts to create new sites by customizing CSS and JS only.
SCSS
37
star
97

aio-cli-plugin-cloudmanager

Cloud Manager plugin for the Adobe I/O CLI
JavaScript
37
star
98

graphicalweb-keynote

Keynote for Graphical Web Conference
JavaScript
37
star
99

oss-contributors

How do tech companies rank amongst themselves when it comes to github.com activity?
JavaScript
35
star
100

aem-spa-page-model-manager

Interface between Adobe Experience Manager and Single Page Application framework.
TypeScript
35
star