Helpers for unopinionated React design component libraries with vanilla-extract.
This package is still in alpha, do not use in production.
npm install @muffin-tin/<package-name>
It requires the latest version of React
to work (18.2)
.
@muffin-tin
is a suite of unopinionated helpers to write your own components, providing advanced ergonomics and helping you with type-safety. It contains the following packages:
-
@muffin-tin/core
: core utilities that are reused through@muffin-tin
and@butter-cream
. Packages depend on it, you probably don't need to install this directly -
@muffin-tin/tag
: contains a polymorphic component with an"as"
prop (as popularised bystyled-components
). It's called<Tag>
because it can render as any HTML tag.<Tag>
is fully type-safe, it will throw errors if you give it an unknown attribute or the wrong type ofref
. -
@muffin-tin/withSprinkles
: higher-order component that takes a React component and a vanilla-extract Sprinkles function and merges them to make the component accept those Sprinkles as props while maintaining full type-safety (@muffin-tin/with-sprinkles
).
If you'd like opinionated helpers with design decisions made for you predefined styling options, check out @butter-cream.