cra-template-slds
v1.0.4
Published
The SLDS template for Create React App.
Downloads
4
Maintainers
Readme
cra-template-slds
This is a Create React App template with the Salesforce Lightning Design System (SLDS)
Features
- Cleaner imports by using absolute imports (doc)
Requirements
- Node version >= 16
Usage
To use this template, follow the steps below:
Create and initialize the app
my-app
:nvm use v16 yarn create react-app my-app --template=slds
or
npx create-react-app my-app --template=slds
Setup SLDS:
cd my-app yarn setup-slds
Run the app by running
yarn start
. It should open the browser onlocalhost:3000
that looks like this:
Development
To test your CRA template locally, run this command:
yarn create react-app my-app --template=slds --template file:<filepath to this repo>
where filepath to this repo
is the file path to this template repo.
For instance,
yarn create react-app my-app --template=slds --template file:./cra-template-slds/
This will create a folder called my-app
containing the React app with SLDS