TwitterGithub

Aspect Ratio

Displays content within a desired ratio.

Mountain views

Installation

npx nx g @spartan-ng/nx:ui aspectratio

Usage

import { HlmAspectRatioDirective } from '@spartan-ng/ui-aspectratio-helm';
<div class="overflow-hidden rounded-xl drop-shadow max-w-xl">
  <div [hlmAspectRatio]="ratio">
    <img alt="Mountain views" src="/mountains.jpg" />
  </div>
</div>
Avatar Alert Dialog