-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db149eb
commit d442b7f
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Getting Started | ||
|
||
First, install the package from NPM (note for monthly call viewers: the package isn't published yet.) | ||
|
||
```sh | ||
npm install @uswds/web-components | ||
``` | ||
|
||
Once you have the package installed, you can use the components in your project. If you import the entire package, all of the components will be available as exports. | ||
|
||
```html | ||
<script type="module"> | ||
import '@uswds/web-components'; | ||
</script> | ||
|
||
<usa-banner></usa-banner> | ||
<usa-link href="https://designsystem.digital.gov">It's dangerous to go alone. Here, take this.</usa-link> | ||
``` | ||
|
||
However, if you import components individually, your build tool may be able to help you ship less code over the wire: | ||
|
||
```html | ||
<script type="module"> | ||
import { UsaLink } from '@uswds/web-components'; | ||
</script> | ||
|
||
<usa-link href="https://designsystem.digital.gov">It's dangerous to go alone. Here, take this.</usa-link> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Meta, Markdown, Typeset } from "@storybook/blocks"; | ||
import content from "./getting-started.md?raw"; | ||
|
||
<Meta title="Getting Started" /> | ||
|
||
<Markdown>{content}</Markdown> |