Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/djgrant/components


https://github.com/djgrant/components

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

README

        

# Component library

Packages for building user interfaces fast.

## [components](./packages/components)

A hacker-friendly collection of React components.

Lightweight, and written with [tailwindcss][tw], these components are intended for forking, rather than being bloated with configuration for every variant imaginable.

[Preview components →](https://components.danielgrant.co)

## [react-tailwind](./packages/react-tailwind)

Build React components using [tailwindcss][tw] and a clean, functional API.

Inspired by [styled-components][sc] and [classnames][cn].

```js
import { tw, switchcase } from "@djgrant/react-tailwind";

const Button = tw.button((props) => [
"font-semibold",
"rounded",
switchcase(size, {
lg: ["text-base", "py-3", "px-4"],
sm: ["text-xs", "py-1", "px-2"],
default: ["text-sm", "py-2", "px-3"],
}),
]);

Submit;
```

[tw]: https://tailwindcss.com
[sc]: https://styled-components.com
[cn]: https://www.npmjs.com/package/classnames