Skip to content

How to access Tailwind breakpoints/screens from React #3822

Answered by ryanfitzer
Svish asked this question in Help
Discussion options

You must be logged in to vote

If you're using the default screen sizes, you can import them:

const defaultTheme = require('tailwindcss/defaultTheme');

console.log(defaultTheme.screens);

If you've customized them, you can import your config:

const customConfig = require('./tailwind.config');

console.log(customConfig.theme.screens);

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@Svish
Comment options

@Svish
Comment options

Answer selected by simonswiss
Comment options

You must be logged in to vote
1 reply
@Svish
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants