https://github.com/metonym/svelte-uswds
Svelte component library that implements the U.S. Web Design System (USWDS).
https://github.com/metonym/svelte-uswds
component-library design-system svelte us-web-design-system uswds
Last synced: 29 days ago
JSON representation
Svelte component library that implements the U.S. Web Design System (USWDS).
- Host: GitHub
- URL: https://github.com/metonym/svelte-uswds
- Owner: metonym
- License: mit
- Created: 2020-04-09T00:54:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-23T20:49:30.000Z (over 4 years ago)
- Last Synced: 2024-04-25T20:03:17.076Z (about 1 year ago)
- Topics: component-library, design-system, svelte, us-web-design-system, uswds
- Language: Svelte
- Homepage: https://svelte-uswds.onrender.com
- Size: 335 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-uswds
[![NPM][npm]][npm-url]
[![Build][build]][build-badge]> Svelte component library that implements the [U.S. Web Design System](https://designsystem.digital.gov/) (USWDS).
## [Documentation](https://svelte-uswds.onrender.com/)
## Getting started
```bash
yarn add -D svelte-uswds
# OR
npm i -D svelte-uswds
```## Adding styles
In your root svelte file, link a stylesheet from a CDN using the `svelte:head` API.
```svelte
```
## Importing components
### Script
```html
import { Accordion, AccordionItem } from "svelte-uswds";
```
### Mark-up
```svelte
Congress shall make no law respecting an establishment of religion, or
prohibiting the free exercise thereof; or abridging the freedom of speech,
or of the press; or the right of the people peaceably to assemble, and to
petition the Government for a redress of grievances.
A well regulated Militia, being necessary to the security of a free State,
the right of the people to keep and bear Arms, shall not be infringed.
```
## TypeScript
This library includes TypeScript definitions ([types](types)).
## Limitations
This library does not support Internet Explorer.
You'll need to polyfill the [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) and [Array.findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
## [Changelog](CHANGELOG.md)
## License
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/svelte-uswds.svg?color=blue
[npm-url]: https://npmjs.com/package/svelte-uswds
[build]: https://travis-ci.com/metonym/svelte-uswds.svg?branch=master
[build-badge]: https://travis-ci.com/metonym/svelte-uswds