Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trussworks/react-uswds

Package Overview
Dependencies
Maintainers
11
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trussworks/react-uswds

React USWDS 2.0 component library

  • 2.7.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7K
decreased by-61.66%
Maintainers
11
Weekly downloads
 
Created
Source

@trussworks/react-uswds

All Contributors

npm version uswds version

CircleCI npm downloads

ReactUSWDS Component Library

This is a frontend component library, built in React with Typescript, based on design patterns defined by the United States Web Design System (USWDS) 2.0. Our primary goal is to document and provide common UI components following the USWDS specification. This library removes a significant amount of overhead UI development for projects based on this standard.

A deployed instance of the ReactUSWDS Storybook is located at: https://trussworks.github.io/react-uswds/

An example application, built with React-USWDS, can be found in the /example folder and run with the appropriate yarn:example commands.

Table of Contents

Install

Install this package with npm or yarn:

yarn add @trussworks/react-uswds

or

npm i @trussworks/react-uswds

Pre-Release

Pre-release packages are published to GitHub Packages every time code is pushed to the main branch. To use, you will need a GitHub access token with the read:packages scope.

  1. Create an .npmrc with
//npm.pkg.github.com/:_authToken=YOUR_TOKEN_GOES_HERE
@trussworks:registry=https://npm.pkg.github.com

or

Create a .yarnrc file with

"@trussworks:registry" "https://npm.pkg.github.com"
  1. In your package.json, use "@trussworks/react-uswds": "next"

See GitHub Packages with npm docs for more detailed information.

Usage

It is strongly suggested applications use the same version of USWDS that was used to build the version of ReactUSWDS they're using. A version mismatch may result in unexpected markup & CSS combinations.

You can import ReactUSWDS components using ES6 syntax:

import { Alert } from '@trussworks/react-uswds'

Warning: Do not include USWDS JS in your project alongside this library (i.e., using import 'uswds'), as that will result in some components that use JS (such as the ComboBox) to initialize twice.

Also make sure to include the following in order to import the compiled CSS from this project:

@import '~@trussworks/react-uswds/lib/index.css';

If you aren't already using USWDS as a dependency, you also need to import USWDS styles. Read more info about using USWDS styles and assets here

Having issues? See FAQs.

Background

The primary deliverable is a published npm package that can be included as a dependency in other projects that use USWDS with React. In order for these components to be useful, they should follow best practices for accessible, semantic, markup; be well-tested across browsers and devices; and allow for an appropriate level of customization. We adhere to a set of development guidelines as much as possible and use automation to enforce tests, linting, and other standards.

Non-Goals

This is not meant to be a one-size-fits-all front end solution, We are starting off with the opinionated decision to cater towards projects that use the U.S. Design System 2.0, and encapsulate these specific styles and markup in React components.

In the process, we expect to gain learnings around how to best abstract out UI code from implementation; how to better standardize and document front end code practices; and how to develop, maintain, and distribute a shared JS library in alignment with our company values at Truss.

Maintainers

Contributing

Interested in contributing? See our guidelines and dev setup here.

Are you a Trussel and new to this project? Check out our on & offboarding guide made just for you!

This repository is governed by the Contributor Covenant

License

Copyright 2021, TrussWorks, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Suzanne Rozier

💻 📖

haworku

💻

Andrew Hobson

💻

John Gedeon

💻

Emily Mahanna

💻

Brandon Lenz

💻

Jeri Sommers

💻

Erin Stanfill

💻

Barry Morrison

💻

Duncan

💻

Arianna Kellogg

💻

Christopher Hui

💻

Jim Benton

💻

Jen Duong

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 27 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc