Skip to content

Commit

Permalink
add super basic installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
heymatthenry committed Aug 14, 2024
1 parent db149eb commit d442b7f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions storybook/getting-started.md
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>
```
6 changes: 6 additions & 0 deletions storybook/getting-started.mdx
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>

0 comments on commit d442b7f

Please sign in to comment.