Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<daff-image
src="https://assets.daff.io/ergonomic_bronze_pants.png"
alt="Ergonomic Bronze Pants T-Shirt"
[width]="934"
[height]="934"
[width]="400"
[height]="400"
>
</daff-image>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[skeleton]="true"
src="https://assets.daff.io/ergonomic_bronze_pants.png"
alt="Ergonomic Bronze Pants T-Shirt"
[width]="934"
[height]="934"
[width]="300"
[height]="300"
>
</daff-image>
35 changes: 6 additions & 29 deletions libs/design/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Image builds on Angular's [`NgOptimizedImage`](https://angular.dev/guide/image-o

## Usage

### Within a standalone component
To use image in a standalone component, import `DAFF_IMAGE_COMPONENTS` directly into your custom component:
Import `DAFF_IMAGE_COMPONENTS` into your component:

```ts
import { Component } from '@angular/core';
Expand All @@ -29,31 +28,9 @@ import { DAFF_IMAGE_COMPONENTS } from '@daffodil/design/image';
export class CustomComponent {}
```

### Within a module (deprecated)
To use image in a module, import `DaffImageModule` into your custom module:

```ts
import { NgModule } from '@angular/core';
import { DaffImageModule } from '@daffodil/design/image';
import { CustomComponent } from './custom.component';

@NgModule({
declarations: [
CustomComponent,
],
exports: [
CustomComponent,
],
imports: [
DaffImageModule,
],
})
export class CustomComponentModule { }
```

> **Warning**
>
> This method is deprecated. It's recommended to update all custom components to standalone.
> **Deprecation notice:**
>
> `DaffImageModule` is deprecated. Use the standalone component imports instead.

## Required attributes
All four of the following attributes are required and will throw an error if missing:
Expand All @@ -67,12 +44,12 @@ All four of the following attributes are required and will throw an error if mis

## Features

## Skeleton screen
### Skeleton screen
Use the `skeleton` property to display a placeholder skeleton screen that helps reduce load-time frustration.

<daff-docs-example-viewer example="skeleton-image"></daff-docs-example-viewer>

## Priority loading
### Priority loading
Use the `priority` property to mark an image as a priority for loading. Priority images are loaded eagerly and not lazy-loaded.

## Accessibility
Expand Down
Loading