About Show If Property True Mixin
This mixin automatically shows or hides elements based on property values. It supports boolean properties, data attributes, and regular attributes. Perfect for dynamic interfaces where visibility depends on state.
💡 Tip: The mixin preserves the original display style and restores it when the property becomes true again!
🎛️ Property Controls
Toggle these properties to show or hide the corresponding bar below:
🎯 Bars Demo
Each bar below is controlled by its corresponding property above:
📜 Property Change Log
📖 Implementation Guide
How to Use the Show If Property True Mixin:
1. Use the mixin element: <show-if-property-true-mixin show-if-property="myProperty">content</show-if-property-true-mixin>
2. Set the property to control visibility: show-if-property="myProperty"
3. The mixin will automatically show/hide based on the property value
✨ Features
What the Show If Property True Mixin Provides:
- Property Detection: Automatically detects boolean properties, data attributes, and regular attributes
- Display Preservation: Remembers and restores the original display style
- Dynamic Updates: Responds to property changes in real-time
- Multiple Sources: Supports element properties, data attributes, and regular attributes
- Programmatic Control: API methods for setting properties and refreshing visibility
- Attribute Support: Works with HTML attributes for declarative usage