@uswds-tailwind/react
v0.3.0-alpha.6
Published
USWDS components for React, styled with Tailwind CSS and powered by zag-js state machines.
Downloads
533
Maintainers
Readme
@uswds-tailwind/react
USWDS components for React, styled with Tailwind CSS and powered by zag-js state machines.
[!NOTE] This package is in alpha. APIs may change between releases.
Install
npm install @uswds-tailwind/react@alpha tailwindcssSetup
Add two @import lines to your global CSS:
// styles.css
@import 'tailwindcss';
@import '@uswds-tailwind/react';Usage
import { Button } from '@uswds-tailwind/react/button'
export default function App() {
return <Button>Get started</Button>
}Each component is also accessible from a subpath import (e.g. @uswds-tailwind/react/accordion) so bundlers can tree-shake unused components.
Documentation
Component API, props, and Storybook examples: uswds-tailwind.com
