3 ms·
Amazing. Been building a custom system on Aria while looking at the spectrum code for learning, familiarity with their architecture, and to avoid their style sy
by Rapzid 3y ago
Amazing. Been building a custom system on Aria while looking at the spectrum code for learning, familiarity with their architecture, and to avoid their style system as we are using tailwind..
I'm excited to try these out and possibly switch over and fill in the gaps. Lots of headless systems are locked into a particular styling system but this looks super flexible and will work perfect with Tailwind. Love the callback for classname that supplies states.
Hope they keep the slot props concept from spectrum.
Edit: Slot props are in! Can't explain how much I like the Spectrum projects.
- steve_adams_86 3y agoWhat are slot props?
- hamerld 3y agoI'm basically doing the same thing as you but I'm also looking through Mantine's source code to complement it. I haven't really grasped what slot are used for tho, can you share a tldr?
- Rapzid 3y agoIt's a set of conventions and utils allowing a parent component to mix properties into slot-aware children so they can be styled and configured to fit within the parent context. https://react-spectrum.adobe.com/react-spectrum/layout.html#slots https://react-spectrum.adobe.com/react-spectrum/layout.html#... Too bad React doesn't have Vue slots built-in, but this is nice for streamlining component APIs. Works well with Tailwind classes.