Overview
app-datepicker is built with Material Design 2021 principles and uses CSS custom properties (CSS variables) for theming. The component renders within Shadow DOM, providing encapsulation while still allowing customization through CSS variables.All styling is done through CSS custom properties, making it easy to theme the component without requiring deep CSS knowledge.
CSS Custom Properties
The component exposes a comprehensive set of CSS custom properties for theming:Color Properties
View all color custom properties
View all color custom properties
From
src/stylings.ts:5-25:Primary Theme Colors
Interactive States
Special Elements
Theme Examples
Material Purple (Default)
Blue Theme
Green Theme
Dark Theme
Component-Specific Styling
Date Picker Dimensions
View dimension custom properties
View dimension custom properties
From
src/date-picker/stylings.ts:4-11:SVG Icons
Scrollbar Styling
The component includes custom scrollbar styling for webkit browsers:View scrollbar styling
View scrollbar styling
From
src/stylings.ts:89-119:Shadow Parts
The component exposes Shadow Parts for advanced styling:Date Picker Parts
View all available parts
View all available parts
From
src/date-picker/date-picker.ts:157-158:Responsive Styling
Complete Theming Example
Here’s a complete example with Lit showing custom theming:Material Design 2021
The component follows Material Design 2021 principles:- Elevation: Uses flat design with subtle shadows
- Typography: System fonts with appropriate sizing
- Color System: Supports primary, surface, and state colors
- Shape: Customizable border radius (default 4px)
- Motion: Smooth transitions for interactive elements
The component uses
overscroll-behavior: contain to prevent scroll chaining, providing a better user experience on mobile devices.Accessibility Considerations
When styling, maintain sufficient color contrast:Dynamic Theming
Change themes at runtime using JavaScript:Next Steps
Advanced Features
Explore week numbers, disabled dates, and more
API Reference
View complete property and method documentation