New to PrimeReact and need help

UI Components for React
Post Reply
brilang
Posts: 3
Joined: 20 May 2019, 06:12

09 Oct 2021, 00:51

I'm new to PrimeReact, and I'm trying to use the Tailwind theme.

It seems to me that not all of Tailwind is in the theme. Specifically the Typography stuff.

For example, if I try to specify className='font-sans', my text doesn't change (on a paragraph or heading). Tailwind CSS docs suggest it should.
Likewise, for adjusting font sizes, shouldn't I be able to use className='text-sm' to get a slightly smaller font size?

Or am I missing something in my understanding of PrimeReact with a theme?

Here's my imports at the top of my app

import 'primereact/resources/primereact.min.css';
import 'primeicons/primeicons.css';
import 'primeflex/primeflex.css';
import 'primereact/resources/themes/tailwind-light/theme.css';

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

21 Oct 2021, 20:53

I don't think PrimeReact is using Tailwind exactly they just created a theme to "look" like Tailwind. From the PrimeTek announcement Note that, the theme does not use tailwind classes and instead provides a look-alike style for a unified design when used together.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: Andrewsj and 4 guests