Ignite UI Web Components - from Infragistics
![Discord](https://img.shields.io/discord/836634487483269200?logo=discord&logoColor=ffffff)
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach. See the Storybook Here!
Usage
In order to use the Ignite UI Web Components in your application you should install the igniteui-webcomponents
package:
npm install igniteui-webcomponents
Next you will need to import the components that you want to use. You could import one or more components using the defineComponents
function like this:
import { defineComponents, IgcAvatarComponent, IgcBadgeComponent } from 'igniteui-webcomponents';
defineComponents(IgcAvatarComponent, IgcBadgeComponent);
You could also import all of the components using the defineAllComponents
function:
import { defineAllComponents } from 'igniteui-webcomponents';
defineAllComponents();
Please note that importing all of the components will increase the bundle size of your application. That's why we recommend you to import only the components that you are actually using.
After the components are imported you could use them in your html:
<igc-avatar initials="AZ"></igc-avatar>
<igc-badge></igc-badge>
Tooling Support
The package contains its own Custom Elements Manifest as well
as Custom Data Format for VSCode.
Refer to your IDE/toolchain documentation to see if you can take advantage of this metadata for linting, type hints and documentation.
Here is a how to enable VSCode auto-completion and hover information for HTML entities from the package.
Add the following line to your user or workspace settings:
{
"html.customData": [
"./node_modules/igniteui-webcomponents/vscode-html-custom-data.json"
]
}
Setup
In order to run the repository locally from the root folder run:
npm install
Linting with ESLint, Prettier, and Types
To scan the project for linting errors, run
npm run lint
You can lint with ESLint and Prettier individually as well
npm run lint:eslint
npm run lint:prettier
To automatically fix many linting errors, run
npm run format
You can format using ESLint and Prettier individually as well
npm run format:eslint
npm run format:prettier
Testing with Web Test Runner
To run the suite of Web Test Runner tests, run
npm run test
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
npm run test:watch
Demoing with Storybook
To run a local instance of Storybook for your component, run
npm run storybook
To build a production version of Storybook, run
npm run storybook:build
Local Demo with web-dev-server
npm serve
To run a local development server that serves the basic demo located in demo/index.html