RE

React

@stitches/react

The modern CSS-in-JS library

Forms
component
components
create
css
css-in-js
global
globals
javascript
js
nesting
Stars
7.8k
Weekly
0
Open issues
120
Bundle
~60 kB

Installation

npm install @stitches/react

Code example

import { useReact } from "@stitches/react";

export function Example() {
  const form = useReact({ defaultValues: { email: "" } });

  function onSubmit(event: React.FormEvent<HTMLFormElement>) {
    event.preventDefault();
    console.log(form);
  }

  return (
    <form onSubmit={onSubmit}>
      <input name="email" type="email" placeholder="you@example.com" />
      <button type="submit">Submit</button>
    </form>
  );
}

Pros & cons

Pros

  • Actively maintained by stephenhaney
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Not supported in React Native
  • 120 open issues on GitHub

FAQs

Alternatives & similar libraries