Skip to content
Open
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
73 changes: 52 additions & 21 deletions docs/angular/src/content/en/components/accordion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Users are enabled to interact and navigate among a list of items, such as thumbn

The following is a basic Angular Accordion example of a FAQ section. It operates as an accordion, with individually working sections. You can toggle each text block with a single click, while expanding multiple panels at the same time. This way you can read information more easily, without having to go back and forth between an automatically expanding and collapsing panel, which conceals the previously opened section every time.

In it, you can see how to define an `igx-accrodion` and its <ApiLink type="ExpansionPanels" suffix={false} label="expansion panels" />. The sample also demonstrates the two types of expansion behavior. The switch button sets the <ApiLink type="Accordion" member="singleBranchExpand" label="singleBranchExpand" /> property to toggle between single and multiple branches to be expanded at a time.
In it, you can see how to define an `igx-accordion` and its <ApiLink type="ExpansionPanels" suffix={false} label="expansion panels" />. The sample also demonstrates the two types of expansion behavior. The switch button sets the <ApiLink type="Accordion" member="singleBranchExpand" label="singleBranchExpand" /> property to toggle between single and multiple branches to be expanded at a time.

<Sample src="/layouts/accordion-sample-1" height={460} alt="Angular Accordion Example" />

Expand All @@ -36,29 +36,13 @@ ng add igniteui-angular

For a complete introduction to the Ignite UI for Angular, read the [_getting started_](/general/getting-started) topic.

The next step is to import the `IgxAccordionModule` in your **app.module.ts** file.
### Standalone Component

```typescript
// app.module.ts

...
import { IgxAccordionModule } from 'igniteui-angular/accordion';
// import { IgxAccordionModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [..., IgxAccordionModule],
...
})
export class AppModule {}
```

Alternatively, as of `16.0.0` you can import the `IgxAccordionComponent` as a standalone dependency, or use the [`IGX_ACCORDION_DIRECTIVES`](https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/accordion/public_api.ts) token to import the component and all of its supporting components and directives.
Since `16.0.0`, `IgxAccordionComponent` is a standalone component. Import `IgxAccordionComponent` directly or use the `IGX_ACCORDION_DIRECTIVES` token, which includes the accordion and all of its supporting components and directives.

```typescript
// home.component.ts

...
import { IGX_ACCORDION_DIRECTIVES } from 'igniteui-angular/accordion';
// import { IGX_ACCORDION_DIRECTIVES } from '@infragistics/igniteui-angular'; for licensed package

Expand All @@ -76,15 +60,34 @@ import { IGX_ACCORDION_DIRECTIVES } from 'igniteui-angular/accordion';
</igx-expansion-panel>
</igx-accordion>
`,
styleUrls: ['home.component.scss'],
standalone: true,
imports: [IGX_ACCORDION_DIRECTIVES]
/* or imports: [IgxAccordionComponent] */
})
export class HomeComponent {}
```

Now that you have the Ignite UI for Angular Accordion module or directives imported, you can start with a basic configuration of the `igx-accordion` and its panels.
### NgModule (Legacy)

For applications using NgModules (Angular versions prior to standalone support), import `IgxAccordionModule` in your **app.module.ts**:

```typescript
// app.module.ts

import { IgxAccordionModule } from 'igniteui-angular/accordion';
// import { IgxAccordionModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
imports: [..., IgxAccordionModule],
})
export class AppModule {}
```

<Aside type="caution">
`IgxAccordionModule` is kept for backwards compatibility only. New projects should use the standalone `IGX_ACCORDION_DIRECTIVES` or `IgxAccordionComponent` import instead.
</Aside>

Now that you have the Ignite UI for Angular Accordion directives imported, you can start with a basic configuration of the `igx-accordion` and its panels.

## Using the Angular Accordion Component

Expand Down Expand Up @@ -245,6 +248,32 @@ You can see the result below.

<hr/>

## Events

The <ApiLink type="Accordion" /> emits the following events during panel expansion and collapse:

| Event | Description | Cancelable |
|-------|-------------|:----------:|
| <ApiLink type="Accordion" member="panelExpanding" label="panelExpanding" /> | Emitted before a panel expands. | Yes |
| <ApiLink type="Accordion" member="panelExpanded" label="panelExpanded" /> | Emitted after a panel has expanded. | No |
| <ApiLink type="Accordion" member="panelCollapsing" label="panelCollapsing" /> | Emitted before a panel collapses. | Yes |
| <ApiLink type="Accordion" member="panelCollapsed" label="panelCollapsed" /> | Emitted after a panel has collapsed. | No |

The cancelable events expose a `cancel` property. Setting it to `true` prevents the expansion or collapse from occurring:

```html
<igx-accordion (panelExpanding)="handleExpanding($event)">
</igx-accordion>
```

```typescript
public handleExpanding(event: IAccordionCancelableEventArgs) {
if (event.panel.disabled) {
event.cancel = true;
}
}
```

## Keyboard Navigation

Keyboard navigation in the Ignite UI for Angular Accordion provides a rich variety of keyboard interactions to the end-user. This functionality is enabled by default and allows end-users to easily navigate through the panels.
Expand Down Expand Up @@ -305,6 +334,8 @@ The last step is to include the component's theme.
- <ApiLink type="ExpansionPanel" suffix={false} />
- <ApiLink type="ExpansionPanelHeader" suffix={false} />
- <ApiLink type="ExpansionPanelBody" suffix={false} />
- <ApiLink type="IAccordionEventArgs" kind="interface" suffix={false} prefixed={false} />
- <ApiLink type="IAccordionCancelableEventArgs" kind="interface" suffix={false} prefixed={false} />
- [IgxExpansionPanel Styles]({environment:sassApiUrl}/themes#mixin-igx-expansion-panel)

## Additional Resources
Expand Down
67 changes: 48 additions & 19 deletions docs/angular/src/content/en/components/action-strip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,13 @@ ng add igniteui-angular

For a complete introduction to the Ignite UI for Angular, read the [_getting started_](/general/getting-started) topic.

The next step is to import the `IgxActionStripModule` in your **app.module.ts** file.
### Standalone Component

```typescript
// app.module.ts

...
import { IgxActionStripModule } from 'igniteui-angular/action-strip';
// import { IgxActionStripModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [..., IgxActionStripModule],
...
})
export class AppModule {}
```

Alternatively, as of `16.0.0` you can import the `IgxActionStripComponent` as a standalone dependency, or use the [`IGX_ACTION_STRIP_DIRECTIVES`](https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/action-strip/public_api.ts) token to import the component and all of its supporting components and directives.
Since `16.0.0`, `IgxActionStripComponent` is a standalone component. Import it directly or use the `IGX_ACTION_STRIP_DIRECTIVES` token, which includes the component and all of its supporting components and directives.

```typescript
// home.component.ts

...
import { IGX_ACTION_STRIP_DIRECTIVES } from 'igniteui-angular/action-strip';
import { IgxButtonDirective } from 'igniteui-angular/button';
import { IgxIconComponent } from 'igniteui-angular/icon';
Expand All @@ -78,7 +62,29 @@ import { IgxIconComponent } from 'igniteui-angular/icon';
export class HomeComponent {}
```

Now that you have the Ignite UI for Angular Action Strip module or directives imported, you can start with a basic configuration of the `igx-action-strip` component.
### NgModule (Legacy)

For applications using NgModules (Angular versions prior to standalone support), import `IgxActionStripModule` in your **app.module.ts**:

```typescript
// app.module.ts

import { IgxActionStripModule } from 'igniteui-angular/action-strip';
// import { IgxActionStripModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [..., IgxActionStripModule],
...
})
export class AppModule {}
```

<Aside type="caution">
`IgxActionStripModule` is kept for backwards compatibility only. New projects should use the standalone `IGX_ACTION_STRIP_DIRECTIVES` or `IgxActionStripComponent` import instead.
</Aside>

Now that you have the Ignite UI for Angular Action Strip directives imported, you can start with a basic configuration of the `igx-action-strip` component.

## Using the Angular Action Strip Component

Expand Down Expand Up @@ -118,6 +124,29 @@ For scenarios where more than three action items will be shown, it is best to us

<Sample src="/menus/action-strip-paragraph-menu" height={400} alt="" />

### Programmatic Visibility

Use `show()` and `hide()` to control the Action Strip programmatically:

```typescript
@ViewChild('actionStrip') actionStrip: IgxActionStripComponent;

// Show the strip for a specific context (e.g. a hovered row)
this.actionStrip.show(rowComponent);

// Hide it when interaction ends
this.actionStrip.hide();
```

The `hidden` input can also be set declaratively as an initial state:

```html
<igx-action-strip [hidden]="false">
<button igxButton (click)="doAction()"><igx-icon>edit</igx-icon></button>
</igx-action-strip>
```


### Reusing the Action Strip

The same Action Strip instance can be used in multiple places in the document as long as the actions need not be visible simultaneously for them.
Expand Down
80 changes: 55 additions & 25 deletions docs/angular/src/content/en/components/autocomplete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,13 @@ ng add igniteui-angular

For a complete introduction to the Ignite UI for Angular, read the [_getting started_](/general/getting-started) topic.

The next step is to import the **IgxAutocompleteModule** and **IgxDropDownModule** in our **app.module**. If <ApiLink type="AutocompleteDisabled" suffix={false} label="igxAutocomplete" /> is applied on an <ApiLink type="InputDirective" suffix={false} label="igxInput" />, the **igxInputGroupModule** is also required:
### Standalone Component

```typescript
// app.module.ts

...
import { IgxAutocompleteModule, IgxDropDownModule } from 'igniteui-angular/drop-down';
import { IgxInputGroupModule } from 'igniteui-angular/input-group';
// import { IgxAutocompleteModule, IgxDropDownModule, IgxInputGroupModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [
...,
IgxAutocompleteModule,
IgxDropDownModule,
IgxInputGroupModule,
....
],
...
})
export class AppModule {}
```

Alternatively, as of `16.0.0` you can import the `IgxAutocompleteDirective` as a standalone directive.
Since `16.0.0`, `IgxAutocompleteDirective` is a standalone component. Import it directly or use the `IGX_DROP_DOWN_DIRECTIVES` token, which includes the component and all of its supporting components and directives.

```typescript
// home.component.ts

...
import { IgxAutocompleteDirective, IGX_DROP_DOWN_DIRECTIVES } from 'igniteui-angular/drop-down';
import { IGX_INPUT_GROUP_DIRECTIVES } from 'igniteui-angular/input-group';
// import { IgxAutocompleteDirective, IGX_INPUT_GROUP_DIRECTIVES, IGX_DROP_DOWN_DIRECTIVES } from '@infragistics/igniteui-angular'; for licensed package
Expand All @@ -89,6 +66,35 @@ import { IGX_INPUT_GROUP_DIRECTIVES } from 'igniteui-angular/input-group';
export class HomeComponent {}
```

### NgModule (Legacy)

For applications using NgModules (Angular versions prior to standalone support), import `IgxAutocompleteModule` in your **app.module.ts**:

```typescript
// app.module.ts

import { IgxAutocompleteModule, IgxDropDownModule } from 'igniteui-angular/drop-down';
import { IgxInputGroupModule } from 'igniteui-angular/input-group';
// import { IgxAutocompleteModule, IgxDropDownModule, IgxInputGroupModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [
...,
IgxAutocompleteModule,
IgxDropDownModule,
IgxInputGroupModule,
....
],
...
})
export class AppModule {}
```

<Aside type="caution">
`IgxAutocompleteModule` is kept for backwards compatibility only. New projects should use the standalone `IGX_DROP_DOWN_DIRECTIVES` or `IgxAutocompleteDirective` import instead.
</Aside>

Now that you have the Ignite UI for Angular Action Strip module or directive imported, you can start with a basic configuration of the `igxAutocomplete` component.

## Using the Angular Autocomplete
Expand Down Expand Up @@ -222,6 +228,30 @@ If everything went right, you should see this in your browser:

<hr/>

## Events

| Event | Description | Cancelable |
|-------|-------------|:----------:|
| `selectionChanging` | Emitted before an item from the dropdown is selected. Provides `value`, `cancel`, and `owner`. | Yes |

Use `selectionChanging` to intercept or transform the selected value:

```typescript
import { AutocompleteSelectionChangingEventArgs } from 'igniteui-angular/drop-down';
// import { AutocompleteSelectionChangingEventArgs } from '@infragistics/igniteui-angular'; for licensed package

public onSelectionChanging(args: AutocompleteSelectionChangingEventArgs) {
if (args.value === 'Restricted City') {
args.cancel = true;
}
}
```

```html
<input igxInput [igxAutocomplete]="townsPanel" (selectionChanging)="onSelectionChanging($event)" />
<igx-drop-down #townsPanel></igx-drop-down>
```

## Keyboard Navigation

<hr/>
Expand Down
42 changes: 24 additions & 18 deletions docs/angular/src/content/en/components/avatar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,13 @@ ng add igniteui-angular

For a complete introduction to the Ignite UI for Angular, read the [_getting started_](/general/getting-started) topic.

The next step is to import the `IgxAvatarModule` in your **app.module.ts** file.
### Standalone Component

```typescript
// app.module.ts

...
import { IgxAvatarModule } from 'igniteui-angular/avatar';
// import { IgxAvatarModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [..., IgxAvatarModule],
...
})
export class AppModule {}
```

Alternatively, as of `16.0.0` you can import the `IgxAvatarComponent` as a standalone dependency.
Since `16.0.0`, `IgxAvatarComponent` is a standalone component. Import it directly into your component's `imports` array.

```typescript
// home.component.ts

...
import { IgxAvatarComponent } from 'igniteui-angular/avatar';
// import { IgxAvatarComponent } from '@infragistics/igniteui-angular'; for licensed package

Expand All @@ -67,6 +51,28 @@ import { IgxAvatarComponent } from 'igniteui-angular/avatar';
export class HomeComponent {}
```

### NgModule (Legacy)

For applications using NgModules (Angular versions prior to standalone support), import `IgxAvatarModule` in your **app.module.ts**:

```typescript
// app.module.ts

import { IgxAvatarModule } from 'igniteui-angular/avatar';
// import { IgxAvatarModule } from '@infragistics/igniteui-angular'; for licensed package

@NgModule({
...
imports: [..., IgxAvatarModule],
...
})
export class AppModule {}
```

<Aside type="caution">
`IgxAvatarModule` is kept for backwards compatibility only. New projects should use the standalone `IgxAvatarComponent` import instead.
</Aside>

Now that you have the Ignite UI for Angular Avatar module or component imported, you can start with a basic configuration of the `igx-avatar` component.

## Using the Angular Avatar Component
Expand Down
Loading
Loading