DaffCompactableDirective

The DaffCompactableDirective allows a component to conditionally apply a compact style by toggling a CSS class. This is useful for creating components that can switch between regular and compact styles based on the compact property.

Example

<div daffCompactable [compact]="isCompact">Content goes here</div>

In this example, the daff-compact class is applied to the div element when isCompact is true, making the div display its compact state.

Styles

The daff-compact class should be defined in your styles to display the compact state as desired.

Selector: '[daffCompactable]'

Properties

Name Type Description
@Input() compact false
Graycore, LLC © 2018 - 2024. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.