theme-ui icon indicating copy to clipboard operation
theme-ui copied to clipboard

How about a dropdown?

Open PeterlitsZo opened this issue 3 years ago • 10 comments

There are a lot of component. But how about add a dropdown menu? You can click headlessui-menu to see want we want to use. If it is a good idea, we can do everything we can to help you.

PeterlitsZo avatar Feb 08 '22 17:02 PeterlitsZo

If I were you, I'd probably use Theme UI with Headless UI. They don't conflict. Theme UI is responsible for styling, Headless UI gives you some nice unstyled logic-only components.

@lachlanjc do you think we should consider expanding patterns in the docs to include combinations of Theme UI with styleless component libraries?

hasparus avatar Feb 08 '22 17:02 hasparus

In the docs, let's go for it! I definitely don't want to be maintaining the logic for interactive components inside Theme UI, but a demo with Radix or Headless would be awesome. From that experience, we could consider eventually having a package built around Radix etc styling their components with Theme UI primitives.

lachlanjc avatar Feb 09 '22 03:02 lachlanjc

Radix? Oh, that may be a good idea!!! I know how to add component with @theme-ui/component (sorry but something I cannot find the component I want...).

Will Radix be a good idea... I will try it!

PeterlitsZo avatar Feb 09 '22 12:02 PeterlitsZo

What you want to do? update document about those or even make another sub-package?

PeterlitsZo avatar Feb 09 '22 12:02 PeterlitsZo

So the idea is that Theme UI is only for styling, and Headless UI, Radix or Reach UI are only for logic. This way you can mix and match to build a design system for your company. We have no ambition to compete with ready-made batteries-included component libraries like Ant Design or Material Design.

How about a CodeSandbox with a demo, an external library or a subdirectory in /examples in this repo.

hasparus avatar Feb 09 '22 15:02 hasparus

In the docs, let's go for it! I definitely don't want to be maintaining the logic for interactive components inside Theme UI, but a demo with Radix or Headless would be awesome. From that experience, we could consider eventually having a package built around Radix etc styling their components with Theme UI primitives.

Well... I am not sure... If you want to use our library with styleless library, why there are @theme-ui/component?

By the way, I am so stupid, that I cannot deal with Redix's component well. Yes they looks will, but have question under my global setting...

PeterlitsZo avatar Feb 10 '22 09:02 PeterlitsZo

By the way, I am so stupid, that I cannot deal with Redix's component well. Yes they looks will, but have question under my global setting...

If you have any problems that you think are not bug reports or stackoverflow style Question and Answer cases, feel free to shoot directly on Theme UI's Discord.

hasparus avatar Feb 10 '22 17:02 hasparus

If you have any problems that you think are not bug reports or stackoverflow style Question and Answer cases, feel free to shoot directly on Theme UI's Discord.

OK, sorry...

PeterlitsZo avatar Feb 11 '22 04:02 PeterlitsZo

Well... I am not sure... If you want to use our library with styleless library, why there are @theme-ui/component?

Ultimately, we're a styling library, & we want to be usable regardless of what framework or other libraries you want to solve your non-styling problems. While there's a reasonable argument it'd be easier to adopt Theme UI if we maintained all these interactive components ourselves, they're an order of magnitude more complex than the styling primitives we offer, & we don't have either the time or the interest to handle all of that. The components package itself is an optional set of primitives to make using Theme UI styling easier, but it was never going to give you every UI possibility you need in a complex app; it's just getting you started with the basics. If someone wants to make a package extending our components with something like Radix, we'd enthusiastically point to it in the docs, or if folks want to contribute one-off examples to our docs, that's great! But we're not trying to have an answer for the functionality of interactive components inside Theme UI just like we don't have an answer to state management—you can combine Theme UI with any of the wide array of packages that do a better job at those things than a homegrown version we'd produce.

lachlanjc avatar Feb 21 '22 01:02 lachlanjc

OK, sorry...

There's nothing to be sorry for, @PeterlitsZo. I just proposed I can help you out live on Discord if you have problems with Theme UI 😅

hasparus avatar Feb 28 '22 22:02 hasparus