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.
npm install @uswds-tailwind/react@alpha tailwindcssAdd two @import lines to your global CSS:
/* style.css */
@import 'tailwindcss';
@import '@uswds-tailwind/react';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.
Component API, props, and Storybook examples: uswds-tailwind.com