Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djgrant/components
https://github.com/djgrant/components
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/djgrant/components
- Owner: djgrant
- Created: 2020-07-21T17:19:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T10:31:26.000Z (almost 2 years ago)
- Last Synced: 2024-10-23T04:18:54.646Z (16 days ago)
- Language: TypeScript
- Homepage: https://components.danielgrant.co
- Size: 3.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
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