@stead/elements
v0.1.9
Published
A collection of design elements in code for the Stead Design Language
Downloads
1
Readme
@stead/elements
A collection of design elements in code for the Stead Design Language
Getting started
To install @stead/elements
in your project, you will need to run the
following command using npm:
npm install -S @stead/elements
If you prefer Yarn, use the following command instead:
yarn add @stead/elements
Usage
@stead/elements
includes all of the other elements packages in the project
and can be useful instead of installing each package individually. This package
offers support for both the JavaScript exports from these packages, in addition
to Sass support.
Sass
@stead/elements
provides two entrypoints for you to leverage: a bundled
entrypoint and a module entrypoint. For most use-cases, the bundled entrypoint
will work for you. If you have taken an extra step to configure your build
configuration to properly resolve @import
s from files, then feel free to use
the module entrypoint.
To include the bundled entrypoint, you can include the following in your Sass file:
@import '@stead/elements/scss/elements';
# Import a specific package nested in elements
@import '@stead/elements/scss/themes/g10';
Include in the example above is how to access nested packages. These packages
are ones that you could optinonally install as a package, like @stead/themes
,
but we've included them inline as a convenience.
To include the module entrypoint, you can include the following in your Sass file:
@import '@stead/elements/scss/index';
JavaScript
@stead/elements
re-exports the exports from all of the packages that it
exports. That means that if an individual package exports a value, then you can
import it the same way when using @stead/elements
. For example, with
@stead/colors
we might write:
import { colors } from '@stead/colors';
With @stead/elements
, you can also import colors
:
import { colors } from '@stead/elements';
📖 API Documentation
If you're looking for @stead/elements
API documentation, check out:
🙌 Contributing
We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide! 👀
📝 License
Licensed under the Apache 2.0 License.