• Stars
    star
    3,503
  • Rank 12,702 (Top 0.3 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 9 years ago
  • Updated 8 months ago

Reviews

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

Repository Details

Salesforce Lightning Design System

Salesforce Lightning Design System

Build Status Dependabot Status

Welcome to the source code repository for Salesforce Lightning Design System, brought to you by Salesforce UX.

SLDS is...

  • Tailored for building Salesforce apps: Using the Lightning Design System markup and CSS framework results in UIs that reflect the Salesforce Lightning look and feel.
  • Continuously updated: As long as youโ€™re using the latest version of the Lightning Design System, your pages are always up to date with Salesforce UI changes.

Getting Started

This project utilizes Storybook for component development. If you would like to know more about Storybook or how it works, check out their website.

Project Installation & Setup:

  1. Clone the repository down locally.
  2. cd into the project and run npm install to install all project dependencies.

Running the Development Environment:

The Storybook development environment can be started by running npm start

Whenever you add, remove, or alter a component's css annotation metadata, you'll need to restart Storybook to see those changes.

Configuring Node and NVM

Node v14 is recommended for use with the Design System repository, and NVM is the recommended choice for managing multiple versions of Node on your computer.

A .nvmrc file is included in this project to aid in local development. To utilize it for setting your project's node version, run nvm use in the root of the directory. Additionally, you can set up a deeper shell integration for automatically invoking the nvmrc file when you change into the project directory by following these instructions.

Developing in Storybook

Once the development server is started with npm start, you can load it at http://localhost:9002.

Annotations

See the annotations guide.

Tasks

npm start

Starts the Storybook server for local development.

npm run gulp -- lint

Lint the code base for syntax and stylistic errors.

# Lint indentation, Sass, JavaScript files
npm run gulp -- lint

# Lint languages independently
npm run gulp -- lint:sass
npm run gulp -- lint:javascript
npm run gulp -- lint:javascript:test
npm run gulp -- lint:spaces
npm run gulp -- lint:html

# HTML5 validation
npm run gulp -- lint:vnu
# HTML5 validation on comma separated blueprint names
npm run gulp -- lint:vnu --components button,path,trees

# a11y validation
npm run gulp -- lint:a11y
# a11y validation on comma separated blueprint names
npm run gulp -- lint:a11y --components button,path,trees

# Lint examples using vnu, aXe, slds validation, and HTML5 validation
npm run gulp -- lint:examples

Pull Request Checks

To run all the checks a pull request will run in Travis use the following command.

# To run every check against all blueprints
npm run pr-checks

# To run every check but target certain blueprints for slow checks like aXe and vnu
npm run pr-checks -- --components button,path,trees

Compilation

npm run build-dist

Generate the Lightning Design System into the .dist directory.

npm run gulp -- styles

Compile Sass to CSS into .assets/styles.

npm run gulp -- clean

Delete temporary build and local files.

Stats

npm run gulp -- styles:stats: Useful stats about the project's deliverables.

Tests

npm test: run all tests, except axe/a11y tests

npm run test:a11y: run axe tests for accessibility violations Results are saved into ./__tests__/a11y/results.

Release

npm release:site: build and release the framework and site

Requires heroku access to build and release the site.

Troubleshooting

See the troubleshooting guide.

Contributing Back to SLDS

See the contributing guide.

Licenses

Got Feedback?

Please open a new GitHub Issue.

More Repositories

1

theo

Theo is a an abstraction for transforming and formatting Design Tokens
JavaScript
1,932
star
2

design-system-ui-kit

Lightning Design System UI Kit
377
star
3

design-system-starter-kit

Rapid prototyping environment using the Salesforce Lightning Design System
HTML
347
star
4

sass-deprecate

Let Sass warn you about the pieces of your UI that are deprecated, providing a clear upgrade path for developers
JavaScript
270
star
5

scss-parser

A library to parse/stringify SCSS
JavaScript
110
star
6

blender

DEPRECATED: this project isn't maintained anymore.
JavaScript
71
star
7

design-system-ios

Salesforce Lightning Design Tokens for iOS
Swift
66
star
8

query-ast

A library to traverse/modify an AST
JavaScript
63
star
9

dnd-a11y-patterns

Examples of accessible drag-and-drop patterns
JavaScript
49
star
10

design-system-ui-kit-data

A collection of fictitious Salesforce data for use as Sketch custom data. Use this info to populate designs created from the Lightning Design System UI Kit.
47
star
11

theo-example

Example project for integrating Design Properties using Theo
JavaScript
29
star
12

design-system-android

Java
24
star
13

gulp-theo

Gulp-theo is a plugin that transforms and formats Design Tokens
JavaScript
18
star
14

portion-control

Badge to quickly communicate project values
JavaScript
11
star
15

instant-vrt

Module for running vrt
JavaScript
8
star
16

design-system-ui-kit-framerx

Public code. Not supported by Salesforce
TypeScript
7
star
17

design-system-bower

7
star
18

design-tokens

DEPRECATED repository - Salesforce Design Tokens
JavaScript
6
star
19

gdm

Git Dependency Manager
JavaScript
6
star
20

design-system-parser

JavaScript
5
star
21

design-system-markup

JavaScript
5
star
22

design-system-sketch

A plugin for interacting with the Lightning Design System in Sketch
4
star
23

lightning-design-system-linter

Lightning Design System design validation directly in Sketch
TypeScript
4
star
24

stylelint-config-slds

Lightning Design System shareable config for stylelint
JavaScript
3
star
25

design-system-windows

C#
2
star
26

heroku-buildpack-nginx

Shell
2
star
27

df19-talk-design-data-science

Dreamforce 19 talk: Improving Design with Data Science files
Jupyter Notebook
1
star
28

test-drive-brown-bag

tdd fun for all
JavaScript
1
star
29

design-system-compiler

Sass Compiler for the design system
JavaScript
1
star
30

scss-inline-imports

A library to inline SCSS @import statements
JavaScript
1
star