
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
Ionic is the app development platform for web developers. Build amazing cross platform mobile, web, and desktop apps all with one shared code base and open web standards
A design system is a collection of reusable components, code snippets, assets, and any other detail
that will allow teams to design consistent user experiences.
Learn how to create one »
⚠️ this spec is in prerelease. All changes may be breaking until 1.0.
A design system is comprised of anything that will help teams efficiently develop consistent interfaces that scale. For example:
As you can see, it covers a broad spectrum of concepts. A specification to describe all that can help us by:
Hadron is a design tool where code is the source of truth. It can read design systems described in this way to allow users to design with them.
This repo contains all the information needed to create design systems to be used at Hadron. You can create your own, publish it to NPM, and add it to your project's package.json file without our intervention 1
It also contains all design systems listed there for public usage.
Design systems dialog at hadron.app
All DS from this repo will be displayed there
If you want to list your design system too for the public, fork this repo, add it, and then open a pull request. You can get inspiration from existing ones. But remember, this is a prerelease, and the specs might change.
A design system it's just a folder with a design-system.json file plus any asset, dependency, or code that it requires. This file have the goal of describing what's available and how to use it.
Your design system will be a dependency of any project using it. Therefore, if it has any external dependencies, you should put them on the package.json file.
Take the Bulma design system in this repo for example. It has a package.json with the "bulma" dependency:
{
"name": "@hadronapp/bulma-ds",
"version": "0.1.0",
"dependencies": {
"bulma": "^0.8.2"
}
}
And it only has snippets. But you could build your entire design system without external dependencies, of course. Or have your components together with your design system definitions, which will make it easier to maintain.
This is the entry point for describing your design system. Place it at the root of your project.
Full example:
{
"name": "@hadronapp/bulma-ds",
"displayName": "Bulma",
"homepage": "https://bulma.io",
"description": "Bulma is a free, open source CSS framework based on Flexbox.",
"dependencies": [
"node_modules/bulma/css/bulma.min.css"
],
"components": [
"./components/*.ds.js"
],
"tokens": [
"./tokens/*.json"
]
}
Component's definitions are js modules. The default export is the metadata for the component. And the variants named export must be an array with each variant definition for this component.
Take a look a this simple button component with 2 variants. From Bulma design system.
export default {
displayName: 'Button',
name: 'button',
category: 'Elements',
description: 'The classic button, in different colors, sizes, and states.',
homepage: 'https://bulma.io/documentation/elements/button'
};
export const variants = [
{
displayName: 'Normal',
picture: {
src: './pictures/button/normal.webp'
},
snippet: {
html: `<button class="button">Button</button>`
}
},
{
displayName: 'Primary',
picture: {
src: './pictures/button/primary.webp'
},
snippet: {
html: `<button class="button is-primary">Primary</button>`,
}
}
];
Button component with 2 variants. Extracted from Bulma design system
Tokens can be used to define class names that are styled on your stylesheets, attributes that are styled in some way for certain -or all- elements, CSS variables or even raw values.
They are defined in JSON files and, like with components, you should refer to them in the design-system.json file.
{
"category": "icons-styles",
"type": "class",
"values": [
{
"value": "fa-xs",
"description": "Icon size: xs"
},
{
"value": "fa-sm",
"description": "Icon size: sm"
},
{
"value": "fa-2x",
"description": "Icon size: 2x"
},
{
"value": "fa-3x",
"description": "Icon size: 3x"
},
{
"value": "fa-rotate-90",
"description": "Rotate icon 90°"
}
]
}
Example extracted from the Font-awesome design system:
⚠️ Hadron doesn't use tokens at this moment
Design systems must be NPM packages. You must add that dependency to your project.
At the moment, there are 2 ways to do that:
Location from the main document to all dependencies that are needed in every document using the design system.
"node_modules/bootstrap/dist/css/bootstrap.css"
{
"src": "node_modules/@github/time-elements/dist/time-elements.js",
"priority": 0,
"type": "module",
"snippets": ["html", "vue"],
...
}
cssProperties: ["border*", "background"]For any ideas or discussion about the design systems API, please open an issue in this repo.
We're also on @hadronapp and spectrum.chat/hadron
1 On hadronapp, installing private npm packages is not currently supported. If you need them, please get in touch and tell us what you're planning to do, as we might accelerate its development.
FAQs
Ionic is the app development platform for web developers. Build amazing cross platform mobile, web, and desktop apps all with one shared code base and open web standards
The npm package ionic-ds receives a total of 2 weekly downloads. As such, ionic-ds popularity was classified as not popular.
We found that ionic-ds demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.