Loading...
Angular Cookbook
2.41
Author
Change Log
Help
Write a Review
Certificate
Create a new Angular v.19 project
Angular Fundamentals
Exercise
Solution
Angular Signals
Exercise
Solution
Cheatsheet
Linked Signals (v.19 experimental)
Angular Resource API (v.19 experimental)
Angular Styling
Encapsulation
Demo: create a tooltip
Cheatsheet
Control Flow blocks
@if block
@switch block
@for block
Demo: Create a Todo List
Http Client
Demo: CRUD Todo List
httpResource (experimental v.19.2)
Components
Anatomy of Components
From Static To Components
Reusable Components
Dynamic content with REST API
Angular Router in v.19
Router & Lazy Loading in Angular v.19
Styling with Tailwind and DaisyUI
Loading...
Send your feedback
feedback?
// ARROW TOP for DARK THEME
// ARROW TOP for light THEME// ARROW LINE for DARK THEME
// ARROW LINE for LIGHT THEME
Styling with Tailwind and DaisyUI
Use & Configure Tailwind & DaisyUI
12
snippets
27
mins
v.18.1.2
Fabio Biondi
Google Developer Expert
Microsoft MVP
#
Tailwind
We love
Tailwind
and we'll use it to style the whole application.
To know more about styling in Angular and Tailwind read the
Angular Basics Book
So let's install it:
src/app.component.ts
Or, if you prefer to use the exact versions we used in this book, you can specify them.
src/app.component.ts
Tailwind Configuration File
Run this command to generate a
tailwind.config.ts
file in the root of your project:
src/app.component.ts
Open the
tailwind.config.ts
and add the
content
path:
tailwind.config.ts
Open
styles.css
and make the Tailwind utilities globally available:
styles.css
The whole procedure is also described in the
official Tailwind documentation
Problems with Visual Studio Code?
Read the article
How to fix Unknown at rule @tailwindcss (unknownAtRules) in VS Code
#
Daisy UI
We can say that
DaisyUI
it's just like Bootstrap... but for Tailwind. It offers several classes to create nice buttons, cards, carousel and so on...
terminal
Add Daisy plugin to Tailwind configuration:
tailwind.config.js
In the next video you can see the whole Tailwind and Daisy UI installation process.
no audio
#
Improve NavBar Component Layout
Previous
Router & Lazy Loading in Angular v.19
URL
/courses/angular/basics/80-router/20-styling
EMAIL
ADD CODE SNIPPET
ADD IMAGE/SCREENSHOTS
VOTE
5
4
3
2
1
Clean Form
Send
#
Max Screen Content
#
Bonus: Simulate Color Theme with Chrome Dev Tools
#
Interactive Demo & Source Code:
Unblock the content
Sign In
It's completely free!
Your email
Password
Sign In
Don’t have an account yet?
Sign Up!
Forgot password?
Or did you not receive
the CONFIRMATION email?
We can now slightly improve the layout of the Navigation bar by adding some Daisy UI classes:
app/core/components/nav-bar.component.ts
Topics
Courses
Bookmarks
there are no topics
Home
•
Blog
•
Login
•
Register