Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[base-ui][examples] Add Base UI + Next.js + Tailwind CSS example in JavaScript #40236

Closed
wants to merge 9 commits into from
Closed

[base-ui][examples] Add Base UI + Next.js + Tailwind CSS example in JavaScript #40236

wants to merge 9 commits into from

Conversation

mapache-salvaje
Copy link
Contributor

Part of #36193

For those who prefer not to use TypeScript, I've converted the existing example project to JS.

Eventually I'd like to see both examples updated to add some MUI branding, but we should wait for an official design before spending too much time editing these, and the updated design should be applied consistently across all examples when it happens. For now I think it's better to have anything rather than nothing.

@mapache-salvaje mapache-salvaje added docs Improvements or additions to the documentation package: base-ui Specific to @mui/base examples Relating to /examples nextjs labels Dec 18, 2023
@mui-bot
Copy link

mui-bot commented Dec 18, 2023

Netlify deploy preview

https://deploy-preview-40236--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against d92b2c1

@zannager zannager requested a review from siriwatknp December 19, 2023 12:06
@danilo-leal
Copy link
Contributor

Sweet! 🤙 Pushed a few commits there, uplifting the design a bit, but I couldn't figure out the Switch and Slider's focus state correctly. A strange dark box shadow appears on the former, even if the track is (correctly) focused, and nothing appears at all on the latter (no idea why).

Another reflection that I had is that I always see us customizing the Base UI component slightly differently depending on the place. For example, if you get all of the components used here and compare the code to their introduction demo, how we customize active, focus, and other conditional states looks different. I never really know which approach is the best/recommended, but the one from this example project feels much easier to parse. 😬

@mapache-salvaje
Copy link
Contributor Author

Another reflection that I had is that I always see us customizing the Base UI component slightly differently depending on the place. For example, if you get all of the components used here and compare the code to their introduction demo, how we customize active, focus, and other conditional states looks different. I never really know which approach is the best/recommended, but the one from this example project feels much easier to parse. 😬

That is really good feedback. As much as we want to keep Base UI open-ended, I think it's still important that we present users with best practices or at least one consistent approach in the docs. I'd love to get @michaldudak and @mj12albert 's thoughts on it!

@michaldudak
Copy link
Member

Having one canonical customization code and reusing it across demos would help a lot here. This is achievable when we have file tabs on the demos and can use the same customized component in multiple demos.

@siriwatknp
Copy link
Member

@samuelsycamore @michaldudak @colmtuite Is this PR ready to be merged or is it waiting for the new APIs?

@michaldudak
Copy link
Member

This should now live in the new Base UI repo, but I'm not keen on just moving it there, with all the API changes planned. Can we revisit this topic once we have the new API across all components in the new repo?
Let's close it here, because we don't want to add anything Base UI-related to the Core repo.

@mapache-salvaje mapache-salvaje deleted the base-next-tailwind-js-example branch April 3, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation examples Relating to /examples nextjs package: base-ui Specific to @mui/base
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants