Overview of Tailwind CSS Components with PrimeVue

Cagatay Civici
15 Dec 202313:40

Summary

TLDRThe video introduces Tailin, a new CSS-based UI component library for Prime View core. It offers customizable components with a pass-through feature, allowing for extensive styling with Tailwind classes. The library, developed in three weeks, provides presets for easy skinning of components and encourages community-driven customization. It also features a Builder tool for creating custom presets and a preset Gallery for sharing unique UI implementations, promising a dynamic and flexible approach to UI development.

Takeaways

  • 🎉 The release of a new Tailwind CSS-based UI component library for PrimeNG Core has been announced.
  • 🔍 The library is designed to be unstyled at its core, allowing for flexibility in styling with CSS libraries like Tailwind.
  • 🌐 The new component library is available at tail.primeyou.org, emphasizing the same components with different 'skins' injected through properties.
  • 🔄 The 'pass-through' feature is highlighted as a key aspect of the library, enabling customization of internal elements with Tailwind classes.
  • 📅 A demonstration of components like the calendar and checkbox showcases the ability to customize and style internal DOM elements.
  • 🛠️ The development process of the Tailwind CSS library took three weeks, emphasizing ease and customization.
  • 📦 Each 'preset' is described as a JavaScript object for pass-through configuration, allowing for easy switching of design systems.
  • 🎨 There are plans for additional presets, including a material design-based preset, encouraging community involvement in creating UI libraries with PrimeNG.
  • 🌑 The library supports multiple light and dark modes, with dynamic switching powered by PrimeNG's unstyled core.
  • 🛑 The importance of starting with PrimeNG in unstyled mode is stressed, along with the need for a Tailwind configuration scanner.
  • 📈 The script mentions a weekly release cycle for new components and features, with a focus on community-driven contributions and customizations.

Q & A

  • What is the main announcement in the video script?

    -The main announcement is the release of a new Tailwind CSS-based UI component library for PrimeView Core, which is available at tail.primeyou.org.

  • Why did the creators decide to build a Tailwind-based UI components library?

    -They decided to build the library because PrimeView has an unstyled core and they wanted to provide a way to inject styles through the pass-through feature, allowing for greater customization and flexibility.

  • What is the pass-through feature and how does it work?

    -The pass-through feature exposes the component's internal elements through an API, allowing users to add properties, classes, styles, and attributes to these elements, thus customizing the components with Tailwind classes or other styles.

  • How long did it take to build the Tailwind-based CSS library?

    -It took three weeks to build the initial version of the Tailwind-based CSS library.

  • What is a 'preset' in the context of this UI library?

    -A 'preset' in this context is a JavaScript object that serves as a pass-through configuration, essentially acting as a skin for the components that can be switched to change the overall design system.

  • What is the significance of the multiple presets feature?

    -The multiple presets feature allows users to switch between different design systems or skins for the components, providing a quick way to change the look and feel of the UI without altering the underlying component logic.

  • What does the term 'SDK' or 'API' imply in the context of the PrimeView Core?

    -It implies that PrimeView Core can be used as a foundation to develop custom UI libraries, leveraging its functionality and the pass-through feature to create unique user interfaces.

  • What is the process for getting started with the new Tailwind-based UI library?

    -To get started, one needs to have PrimeView set up in unstyled mode and configure Tailwind to scan PrimeView components, ensuring that the Just-In-Time compiler does not remove any classes.

  • How often can users expect new releases of the library?

    -Users can expect new releases every Wednesday, with new components and features being added regularly.

  • What is the 'Builder' tool mentioned in the script?

    -The 'Builder' is a small tool designed to help users create their own presets by selecting components and naming the preset, making it easier to customize and build upon the existing library.

  • What is the 'Preset Gallery' and how does it contribute to the community?

    -The 'Preset Gallery' is a community-driven space where users can share and showcase their custom presets and UI implementations, acting as a resource for inspiration and collaboration.

Outlines

00:00

🚀 Launch of Tailwind CSS-based UI Library for Prime View Core

The script introduces a new Tailwind CSS-based UI component library for Prime View Core. The presenter aims to provide an overview of the project's progress and future plans. The library is designed to work with Prime View's unstyled core, allowing for customizable skins via a pass-through feature. This feature exposes internal elements of components for styling with Tailwind classes. The library is available at tail.primeyou.org, and the components remain consistent, only the skin is injected differently. The project was completed in three weeks, showcasing the ease of customization. Each skin is referred to as a preset, a JavaScript object that configures the pass-through properties. The website features multiple presets that can be switched to change the design system. There are also plans for presets based on other design systems like Material Design. The script concludes by emphasizing the community's role in building their own UI libraries using Prime View as an SDK or API.

05:01

📦 Customization and Release Process of Tailwind-based Components

This paragraph delves into the customization options available with the new UI components. The script explains the process of accessing and modifying the presets, which are essentially JavaScript objects that dictate the pass-through configuration. It discusses the decision not to publish presets as an npm package to allow for greater customization flexibility. Instead, users are encouraged to copy and paste the necessary files from GitHub into their projects. The script also highlights the inclusion of a color palette from Tailwind and a light/dark mode switch, which is powered by Prime View's unstyled core. The variety of dark modes is demonstrated, showing how CSS variables can be used to dynamically change themes. Additionally, a Builder tool is introduced to assist users in creating their own presets, and a preset gallery is mentioned as a community-driven feature for sharing custom component designs.

10:02

🛠️ Community and Customization Tools for Tailwind UI Components

The final paragraph focuses on the community aspect and the tools provided for customization. It describes the preset gallery as a platform similar to CodePen, where users can share their custom component designs, such as material input switches and snack bars. The script mentions the creation of six examples by the presenter and encourages team members and the community to contribute. The gallery serves as a space for users to explore and implement unique UI designs that go beyond the standard offerings of the Prime View component library. The paragraph also discusses the flexibility of the pass-through feature, which allows for the extension of components with additional attributes not originally present in the Prime View core. The script ends by summarizing the release schedule, with new components planned for each Wednesday, and hints at the upcoming release of a data table skin. The emphasis is on the empowerment of users to fully customize their UI components and the anticipation of an exciting 2024 for Prime View users.

Mindmap

Keywords

💡Tailwind CSS

Tailwind CSS is a highly customizable, utility-first CSS framework that provides developers with a set of pre-defined classes for rapid UI development. In the context of the video, Tailwind CSS is used as the styling engine for the new UI component library for Prime View core, allowing for the injection of styles through properties and enabling a wide range of customization options.

💡Prime View core

Prime View core is an unstyled UI framework that provides the foundational components for building user interfaces without being tied to a specific CSS library. The video discusses the creation of a new Tailwind CSS-based UI component library for Prime View core, emphasizing the flexibility and customization capabilities it offers to developers.

💡Pass-through feature

The pass-through feature is a mechanism that allows developers to customize the internal elements of UI components by exposing them through an API. In the video, this feature is highlighted as a key aspect of the new Tailwind CSS-based library, enabling the addition of properties, classes, and styles to the components, thus personalizing their appearance.

💡Presets

Presets in the video refer to pre-configured JavaScript objects that define the 'skin' or appearance of the UI components. Each preset acts as a design system, allowing for easy switching between different styles or themes. The script mentions that presets can be customized and are a fundamental part of the new UI component library's flexibility.

💡Component library

A component library in the context of the video is a collection of pre-built UI components that can be used to create user interfaces quickly and efficiently. The new Tailwind CSS-based UI component library for Prime View core is discussed as a way to provide developers with a wide range of customizable components.

💡Customization

Customization is a central theme in the video, referring to the ability to modify the appearance and behavior of UI components. The Tailwind CSS-based library allows for extensive customization through the pass-through feature and the use of presets, empowering developers to tailor the components to their specific needs.

💡Builder

The Builder mentioned in the script is a tool designed to assist developers in creating their own presets for the UI components. It allows for the selection of specific components and the naming of custom presets, streamlining the process of building a personalized UI component library.

💡Preset Gallery

The Preset Gallery is a community-driven platform showcased in the video, which serves as a collection of different UI design implementations created by users. It is a place where developers can share and explore various presets, contributing to a rich ecosystem of UI designs built on Prime View core.

💡Unstyled core

The term 'unstyled core' refers to the foundational components of Prime View that do not have any inherent styling, allowing for the integration of any CSS framework, such as Tailwind CSS, for styling purposes. The video emphasizes the benefits of starting with an unstyled core for maximum flexibility in UI development.

💡Light and Dark modes

Light and Dark modes are UI themes that adjust the color scheme of an application to be either light or dark, typically to suit user preferences or to improve readability in different lighting conditions. The video discusses the implementation of multiple light and dark modes in the new Tailwind CSS-based UI component library, demonstrating the adaptability of the components.

💡Just-in-Time (JIT) compiler

Just-in-Time compilation is a method where code is compiled at runtime, optimizing performance. In the context of the video, Tailwind CSS uses a JIT compiler to add classes on demand, which is an important aspect of how the styling is applied dynamically to the Prime View core components.

Highlights

Introduction of a new Tailwind CSS-based UI component library for Prime View core.

The library is available at tail.primeyou.org and offers the same components with a different skin.

The components are skinnable through the pass-through properties feature, allowing customization of internal elements.

Demonstration of how to customize checkbox and calendar components using the pass-through feature.

The development of the Tailwind-based CSS library was completed in three weeks, emphasizing ease and customizability.

Each skin is referred to as a preset, which is a JavaScript object for pass-through configuration.

Multiple presets allow for switching between different design systems easily.

Plans for future presets include material design-based options and community-driven UI implementations.

Prime View is positioned as an SDK or API for developing custom UI libraries.

The color palette from Tailwind is integrated, and a light/dark mode switch is powered by the unstyled core of Prime View.

A tutorial will guide users on how to get started with Prime View in unstyled mode and configure Tailwind.

More than 30 components are currently available, with new releases planned for every Wednesday.

The Builder tool is introduced to assist in creating custom presets for different components.

The Preset Gallery showcases community-driven examples and allows users to submit their own creations.

Customization extends beyond what Prime View core provides, enabling users to add attributes not originally present in components.

Upcoming releases will include a data table component, with the next version expected by mid-January.

The approach of providing full code access allows for extensive customization and adaptability.

Future tutorials will cover building custom presets, component customization, using the Builder, and creating gallery items.

Prime View and other libraries continue to evolve, promising an exciting 2024 for Prime users.

Transcripts

play00:02

hello to all today I have some exciting

play00:04

news the new tailin CSS based UI

play00:06

component library for Prime View core is

play00:09

out and in this video I'd like to go

play00:11

through over as an as to give you an

play00:13

overview of what we have done so far and

play00:16

what's coming up and in the upcoming

play00:18

videos we will go um in more detail and

play00:23

work with the components try to

play00:24

customize them and so on so what is this

play00:28

actually it's a Prime View has an

play00:30

unstyled core so the core doesn't depend

play00:33

on any CSS Library so we couldn't fit

play00:36

all these features into a single

play00:38

showcase single website Prime view.org

play00:40

so we have decided to take a different

play00:43

approach and try to build this Talent

play00:45

based UI components and it's available

play00:48

at tail. Prime you.org the main thing is

play00:51

the components are exactly the same so

play00:55

but the skin is injected through the

play00:57

pass through properties feature the pass

play01:00

through feature is quite uh exciting

play01:02

actually so it allows you for example

play01:05

let's check out the calendar or maybe

play01:07

checkbox so if you go to the pass

play01:09

through tab the component internal

play01:12

internal um elements are exposed through

play01:16

the pass through API it allows you to

play01:19

for example the checkbox has the alter

play01:21

Rim the icon and so on so every every

play01:24

Dom element is accessible with the pass

play01:27

through feature so that you can add

play01:29

elements or so so you so sorry you can

play01:31

add properties and and classes and style

play01:35

and area attributes anything you like to

play01:37

these elements so since class and style

play01:40

are um very special uh you will be able

play01:44

to inject your Tailwind classes which

play01:46

means you can style them with tail as I

play01:48

mentioned we had some demos but they

play01:51

were like some hidden somewhere so we

play01:54

built this tail based CSS library in

play01:57

three weeks actually so this is quite uh

play02:01

the whole thing is quite easy and

play02:02

customizable for us to do because we

play02:04

don't write components we write skins so

play02:07

each skin is called a preset and the

play02:10

preset is basically a JavaScript object

play02:12

it's a pass through

play02:14

configuration I will show you one and

play02:17

let's see what we have here on the main

play02:20

website the multiple presets features

play02:22

quite nice so that you can switch

play02:24

presets a preset is more like maybe if

play02:27

you skin all of the switch it will give

play02:29

you a design system and but a preset

play02:31

maybe for a single compound as well

play02:34

because in the P preset Gallery I

play02:36

created like six examples for you it's

play02:38

not like the whole lip just one so a

play02:41

preset is more like a skin for um uh the

play02:46

pass through object for for a component

play02:48

so the idea is that you can also

play02:51

switch uh presets for example this one

play02:54

is the wind I can switch to Lara and

play02:57

more presets are coming up there are

play02:59

some plans to do a material uh design

play03:02

based preset and if you like some of the

play03:06

nice uis that you'll see we can

play03:09

Implement them as pres presets uh which

play03:12

means Prime View is now an like an SDK

play03:15

or an API to develop your own UI Library

play03:17

actually it's funny but we can also

play03:20

develop the other libraries that other

play03:22

well-known libraries in ecosystem with

play03:24

Prime View because they usually depend

play03:26

on a CSS Library like Tailwind pstp

play03:29

material so so we can just provide them

play03:32

a preset for them in since Prime has a

play03:35

lot of functionality I mean I really

play03:38

really expect the community to pick this

play03:40

up and build their own UI libraries

play03:42

based on Prime View so there's a color

play03:45

palette of course from tailwind and

play03:47

Light Dark switch is kind of different

play03:49

because there are various dark modes and

play03:50

various light modes and it's powered by

play03:54

Prime View unstyled

play03:55

core all right let's begin so to get

play04:00

started there will be a separate

play04:02

tutorial but it's the main thing here is

play04:05

that you need Prime View to begin with

play04:07

of course it's because the um it's based

play04:10

on Prime View unstyled course so you

play04:12

need to set uh Prime View in unstyled

play04:15

mode and once you have regular tailin

play04:18

configuration there's no special

play04:21

configuration required except that you

play04:23

need to add the content scanner of

play04:26

tailin uh to make sure that tailin also

play04:28

scans Prime View stuff in the no modules

play04:31

otherwise it will remove some of the

play04:33

classes because you know tailin uses

play04:35

Justus in time compiler it's adds the

play04:38

classes on demand and so on so there's

play04:41

every preset has a couple of CSS

play04:43

variables in the in this case just

play04:46

primary Shades and service and so on so

play04:49

I'll not go through the details of the

play04:52

documentation because we have a separate

play04:55

videos coming up for that but let's

play04:56

check out the current lineup currently

play04:58

we have more than 30 components but um

play05:01

every Wednesday we will do a new release

play05:03

and there will be new components for

play05:05

example let's check out the input switch

play05:07

it looks like regular input switch but

play05:09

it's basically tailent input switch and

play05:12

if you check out for example droptown so

play05:15

we have the same Lara it's quite nice

play05:18

because we can also Implement these

play05:19

animations with

play05:21

tailand so here we have um

play05:25

the drop down for example if we check

play05:28

out here we can reach to the wind preset

play05:31

and now the Tailwind classes a different

play05:34

set of classes are applied and we can

play05:36

see that here so here's the Lara preset

play05:39

for drop down for example it has

play05:42

different H States and so on and here is

play05:46

the wind version it has some it has a

play05:49

condense mode uses a different highlight

play05:52

and so on um you have full code you have

play05:55

access to the full code here because

play05:57

this is how it's used you have to copy

play05:59

and paste these presets um and then add

play06:03

them to your project which means so

play06:05

that's the biggest thing uh that's the

play06:07

biggest decision that we made um if we

play06:11

put these all these presets to an mpm

play06:14

package we could have done that of

play06:16

course mpm publish is free I mean we

play06:18

could have done that but then how are

play06:20

you going to customize background colors

play06:22

hovers stat everything how are you going

play06:24

to do the styling if you just pick them

play06:27

up from nod modules it will be

play06:29

JavaScript import file and then it will

play06:32

be like CSS trying to CSS overwrite with

play06:36

some classes and you you're trying you

play06:37

will add importance and so on it's still

play06:40

possible but um the the approach we are

play06:44

suggesting is that copy paste these

play06:46

releases are available on GitHub and

play06:49

then you just get these uh file

play06:52

extracted to your project and start

play06:53

using since the folder is in the same um

play06:57

application folder that you're using you

play06:59

can just switch change everything for

play07:02

because we have decided this based on

play07:04

user feedback in the past we were just

play07:07

uh we published the tailet preset to mpm

play07:11

and then many users are having problems

play07:12

with trying to customize for even a

play07:14

simple like how I can custom how can I

play07:17

customize the background of an input to

play07:19

different color now you have access to

play07:21

everything here because it's in your

play07:23

Source actually it's the it's actually a

play07:26

part of your application Source it's not

play07:27

something that you import from as a

play07:30

module and another cool thing here is

play07:33

that let's check out for

play07:34

example um

play07:37

checkbox now it's you see that it's

play07:40

quite small

play07:41

the um let's check out one for example

play07:45

tab view could be nice so as I mentioned

play07:48

there are multiple dark modes and

play07:50

multiple light modes so here um the

play07:53

light mode is not quite visible because

play07:56

hold the surface layers white but for

play07:58

example there's a small tone change as

play08:01

you can see um and if we we can check

play08:04

out the primary colors as well quite

play08:07

easily it's based on CSS variables so

play08:10

it's it's dynamically possible let's go

play08:12

to the dark mode and there are a couple

play08:14

of dark modes as I mentioned for example

play08:16

each dark mode can have their own uh set

play08:20

of colors for the dark mode maybe a

play08:23

fully black one or maybe some with the

play08:26

bluish colors and so on which I like

play08:28

this one so I will keep this so um how

play08:32

we how this is done actually this is

play08:35

thanks to uh if you check out for

play08:38

example maybe there will be a preset

play08:41

here here we

play08:44

have

play08:47

um dark border primary this is a tail

play08:51

and extension plus there's another ex

play08:54

extension called surface so we add these

play08:56

extensions to our

play08:58

Tailwind extended colors and with

play09:01

JavaScript we once we switch these

play09:03

colors Everything Changes these colors

play09:06

are semantic and the tail and extended

play09:10

colors are used by the preset so the

play09:12

checkbox doesn't use background white or

play09:15

something it uses surface zero surface

play09:19

uh 500 and primary so that once you can

play09:21

switch them as a CSS variable uh you're

play09:24

good to go um the next thing is the

play09:26

Builder uh Builder is a small tool to

play09:29

help you uh build your own presets so

play09:33

that you can choose for example I want

play09:35

drop- down calendar and you type the

play09:37

preset name my preset because releases

play09:41

are on GitHub and it the zip file

play09:43

contains everything now you can just

play09:45

download and put it to your project it's

play09:47

simple in case you don't want to use

play09:50

everything and the preset Gallery is

play09:52

something that I was really excited

play09:54

about um that I I worked on it and

play09:56

implemented myself so the gallery is

play09:59

like uh instead of so it's idea is to

play10:02

make a Community Driven Gallery like U

play10:05

it's like a Cod pen as well for and it's

play10:08

not for the whole library but if you

play10:10

have an idea like I had a couple like

play10:12

how to implement the material input

play10:13

switch how to use a material snack bar

play10:16

material input field with float labels a

play10:18

glass morphic for example let's see if

play10:20

this will work a glass morphic version

play10:22

and maybe shatan like dialog if you like

play10:24

that style and how to implement that

play10:28

that goes this goes beyond what you V

play10:31

Pro component Library provides you you

play10:33

are freestyle you're just Unleashed to

play10:36

do whatever you are you like to do uh

play10:38

and detail is your key and your tool and

play10:41

powered by Prime VI core so more items

play10:45

are planned for gallery and you can also

play10:48

uh create your own um Gallery item and

play10:52

submit to us and we will just provide it

play10:54

and we display the GitHub username the

play10:57

stars and to kick startings I at the

play11:00

weekend I just created six examples some

play11:03

of our team members will also provide

play11:05

one and so this is gives you an idea

play11:08

because for example if you check out the

play11:09

metal input switch uh it goes beyond

play11:12

what the Prime View core can provide you

play11:14

can even customize you can even add

play11:16

attributes that does not happen uh that

play11:20

doesn't exist on the components for

play11:22

example uh the material input switch the

play11:25

material toggle doesn't have an accent

play11:27

um accent mode in Prime View core but

play11:30

with with with all this pass through

play11:32

stuff I was able to extend the

play11:34

components and edit an accent mode as

play11:36

well so here you can see I have a glass

play11:40

morphic UI uh implemented with Prime

play11:43

View and unst uh it's quite nice and

play11:46

this is a material toggle that I've done

play11:48

so this is the primary and this is ex as

play11:52

you can see the component is same so you

play11:54

use input switch your application code

play11:56

doesn't change that's the magic so you

play11:58

just inject your Styles uh through an

play12:02

API and the cool thing part the cool

play12:04

part is that there was an accents here

play12:07

that was not available uh this type

play12:09

equal the accent doesn't exist so I just

play12:12

added

play12:14

it okay um so the TA to summarize the

play12:18

tailin website is out every Wednesday we

play12:21

will provide a new release and stay

play12:24

tuned next version will bring the mighty

play12:26

data table uh the good part as I

play12:29

mentioned we we are not writing a data

play12:31

table for this we are just providing a

play12:32

skin so it will be quite this the whole

play12:35

thing was done in 3 weeks so by the end

play12:37

of maybe after the holidays in by mid

play12:41

January before the conference session

play12:43

begins uh because we going to present

play12:45

these in the conferences uh we Pro we

play12:47

are trying to provide everything and

play12:49

with two presets at least with wind and

play12:52

Lara to give you an idea but as I

play12:54

mentioned this is a tool to build your

play12:56

own you can use it like this but the

play12:59

idea is that you have the full code you

play13:00

change whatever you like you change the

play13:02

pieces the presets are here to give you

play13:05

a a head start okay uh in the next

play13:08

stream of tutorials we will go through

play13:10

how we will go to we will discuss some

play13:13

codes how to uh build your own presets

play13:15

how to customize the components how to

play13:17

use the Builder and how to create a

play13:19

gallery item and so on there's so much

play13:21

things to discuss and in the meantime

play13:25

Prime View and other libraries are going

play13:26

strong with new modes so this was just

play13:28

the Milestone and more stuff are coming

play13:31

ahead and 2024 will be quite exciting

play13:34

for Prime users always B on Prime and

play13:38

stay tuned thank you

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Tailwind CSSUI ComponentsPrime ViewCustomizationJavaScriptPresetsDesign SystemWeb DevelopmentDark ModeLight ModeBuilder Tool
Benötigen Sie eine Zusammenfassung auf Englisch?