-
Contained
+ return (
+
+
+
+ Confirm
+
+
+ Send
+
+ Cancel
+
+ Add
+
+
+
- );
- }
+
+ );
}
// rendering above class to the React DOM
diff --git a/samples/inputs/button/tailwind-styling/.devcontainer/devcontainer.json b/samples/inputs/button/tailwind-styling/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..ff434ecd44
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/.devcontainer/devcontainer.json
@@ -0,0 +1,4 @@
+{
+ "name": "Node.js",
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:22"
+}
diff --git a/samples/inputs/button/tailwind-styling/.eslintrc.js b/samples/inputs/button/tailwind-styling/.eslintrc.js
new file mode 100644
index 0000000000..75a0e4251b
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/.eslintrc.js
@@ -0,0 +1,31 @@
+// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
+module.exports = {
+ parser: "@typescript-eslint/parser",
+ parserOptions: {
+ ecmaVersion: 2020,
+ sourceType: "module",
+ ecmaFeatures: {
+ jsx: true
+ }
+ },
+ settings: {
+ react: {
+ version: "999.999.999"
+ }
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended",
+ "plugin:@typescript-eslint/recommended"
+ ],
+ rules: {
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "prefer-const": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ }
+};
diff --git a/samples/inputs/button/tailwind-styling/README.md b/samples/inputs/button/tailwind-styling/README.md
new file mode 100644
index 0000000000..3279dcc8f2
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/README.md
@@ -0,0 +1,56 @@
+
+
+
+This folder contains implementation of React application with example of Tailwind Styling feature using [Button](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Branches
+
+> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
+
+## Instructions
+
+Follow these instructions to run this example:
+
+
+```
+git clone https://github.com/IgniteUI/igniteui-react-examples.git
+git checkout master
+cd ./igniteui-react-examples
+cd ./samples/inputs/button/tailwind-styling
+```
+
+open above folder in VS Code or type:
+```
+code .
+```
+
+In terminal window, run:
+```
+npm install --legacy-peer-deps
+npm run-script start
+```
+
+Then open http://localhost:4200/ in your browser
+
+
+## Learn More
+
+To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
diff --git a/samples/inputs/button/tailwind-styling/index.html b/samples/inputs/button/tailwind-styling/index.html
new file mode 100644
index 0000000000..5b35d0cdfb
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/index.html
@@ -0,0 +1,11 @@
+
+
+
+
ButtonTailwindStyling
+
+
+
+
+
+
+
diff --git a/samples/inputs/button/tailwind-styling/package.json b/samples/inputs/button/tailwind-styling/package.json
new file mode 100644
index 0000000000..4db0e74b0e
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "react-button-tailwind-styling",
+ "description": "This project provides example of Button Tailwind Styling using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@tailwindcss/vite": "^4.1.14",
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "tailwindcss": "^4.1.14",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/inputs/button/tailwind-styling/sandbox.config.json b/samples/inputs/button/tailwind-styling/sandbox.config.json
new file mode 100644
index 0000000000..49a80d1d8b
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/sandbox.config.json
@@ -0,0 +1,5 @@
+{
+ "infiniteLoopProtection": false,
+ "hardReloadOnChange": false,
+ "view": "browser"
+}
diff --git a/samples/inputs/button/tailwind-styling/src/index.css b/samples/inputs/button/tailwind-styling/src/index.css
new file mode 100644
index 0000000000..af88ee1c32
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/src/index.css
@@ -0,0 +1,77 @@
+/* shared styles are loaded from: */
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+@layer theme, base, components, utilities;
+@import "tailwindcss/theme.css" layer(theme);
+@import "tailwindcss/utilities.css" layer(utilities);
+
+/* web component internals cannot be styled with Tailwind utilities,
+ because they live in the shadow DOM, so exposed CSS parts are used */
+
+.button-grid {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ gap: 1.5rem;
+ padding: 1rem;
+}
+
+.button-row {
+ display: grid;
+ grid-template-columns: repeat(4, 7rem);
+ align-items: center;
+ justify-items: center;
+ gap: 1.5rem;
+}
+
+.confirm-button::part(base) {
+ background-color: var(--color-indigo-700);
+ color: var(--color-white);
+}
+
+.confirm-button:hover::part(base) {
+ background-color: var(--color-indigo-900);
+ color: var(--color-white);
+}
+
+.send-button::part(base) {
+ border-color: var(--color-pink-600);
+ color: var(--color-pink-600);
+}
+
+.send-button:hover::part(base) {
+ background-color: var(--color-pink-600);
+ border-color: var(--color-pink-700);
+ color: var(--color-white);
+}
+
+.send-button igc-icon {
+ color: var(--color-pink-600);
+}
+
+.send-button:hover igc-icon {
+ color: var(--color-white);
+}
+
+.cancel-button::part(base) {
+ color: var(--color-amber-700);
+}
+
+.cancel-button:hover::part(base) {
+ background-color: var(--color-amber-100);
+ color: var(--color-amber-900);
+}
+
+.add-button::part(base) {
+ background-color: var(--color-teal-500);
+ color: var(--color-black);
+ border-radius: 9999px;
+}
+
+.add-button:hover::part(base) {
+ background-color: var(--color-teal-800);
+ color: var(--color-white);
+}
+
diff --git a/samples/inputs/button/tailwind-styling/src/index.tsx b/samples/inputs/button/tailwind-styling/src/index.tsx
new file mode 100644
index 0000000000..55ccbde39d
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/src/index.tsx
@@ -0,0 +1,37 @@
+import React, { useEffect } from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import { IgrButton, IgrIcon, registerIconFromText } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+const icons = [
+ { name: 'send', text: '
' },
+ { name: 'add', text: '
' },
+];
+
+export default function ButtonTailwindStyling(): JSX.Element {
+ useEffect(() => {
+ icons.forEach((icon) => registerIconFromText(icon.name, icon.text, 'material'));
+ }, []);
+
+ return (
+
+
+ Confirm
+
+
+ Send
+
+ Cancel
+
+ Add
+
+
+
+
+ );
+}
+
+// rendering above class to the React DOM
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
);
diff --git a/samples/inputs/button/tailwind-styling/tsconfig.json b/samples/inputs/button/tailwind-styling/tsconfig.json
new file mode 100644
index 0000000000..e7db8a94f5
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/inputs/button/tailwind-styling/vite.config.js b/samples/inputs/button/tailwind-styling/vite.config.js
new file mode 100644
index 0000000000..c1fff0c83c
--- /dev/null
+++ b/samples/inputs/button/tailwind-styling/vite.config.js
@@ -0,0 +1,13 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import tailwindcss from '@tailwindcss/vite';
+
+export default defineConfig({
+ plugins: [react(), tailwindcss()],
+ build: {
+ outDir: 'build'
+ },
+ server: {
+ open: false
+ },
+});
diff --git a/samples/inputs/switches/checking/src/index.css b/samples/inputs/switches/checking/src/index.css
deleted file mode 100644
index 1f53b8aa05..0000000000
--- a/samples/inputs/switches/checking/src/index.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* shared styles are loaded from: */
-/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
\ No newline at end of file
diff --git a/samples/inputs/switches/checking/src/index.tsx b/samples/inputs/switches/checking/src/index.tsx
deleted file mode 100644
index 2c7125cc24..0000000000
--- a/samples/inputs/switches/checking/src/index.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import './index.css';
-import { IgrSwitch } from 'igniteui-react';
-import 'igniteui-webcomponents/themes/light/bootstrap.css';
-
-export default function SwitchOutlined() {
-
- return (
-
- Label
-
- );
-}
-
-// rendering above component to the React DOM
-const root = ReactDOM.createRoot(document.getElementById('root'));
-root.render(
);
diff --git a/samples/inputs/switches/disabled/src/index.css b/samples/inputs/switches/disabled/src/index.css
index 1f53b8aa05..b808c875fa 100644
--- a/samples/inputs/switches/disabled/src/index.css
+++ b/samples/inputs/switches/disabled/src/index.css
@@ -1,2 +1,29 @@
/* shared styles are loaded from: */
-/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
\ No newline at end of file
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
+
+.states {
+ --variant-gap: 60px;
+ --label-gap: 30px;
+
+ display: flex;
+ align-items: center;
+ gap: var(--variant-gap);
+
+ & .states__variant {
+ display: flex;
+ align-items: center;
+ gap: var(--label-gap);
+ }
+
+ & .states__label {
+ font: 500 14px / 24px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.1px;
+ color: var(--ig-gray-600);
+ }
+}
\ No newline at end of file
diff --git a/samples/inputs/switches/disabled/src/index.tsx b/samples/inputs/switches/disabled/src/index.tsx
index 5ab9aa932f..b4df9c15de 100644
--- a/samples/inputs/switches/disabled/src/index.tsx
+++ b/samples/inputs/switches/disabled/src/index.tsx
@@ -8,7 +8,20 @@ export default function SwitchDisabled() {
return (
-
+
+
+ Disabled Checked
+
+ Power
+
+
+
+ Disabled Unchecked
+
+ Power
+
+
+
);
}
diff --git a/samples/inputs/switches/checking/.devcontainer/devcontainer.json b/samples/inputs/switches/enabled/.devcontainer/devcontainer.json
similarity index 100%
rename from samples/inputs/switches/checking/.devcontainer/devcontainer.json
rename to samples/inputs/switches/enabled/.devcontainer/devcontainer.json
diff --git a/samples/inputs/switches/enabled/.eslintrc.js b/samples/inputs/switches/enabled/.eslintrc.js
new file mode 100644
index 0000000000..b45160a9ee
--- /dev/null
+++ b/samples/inputs/switches/enabled/.eslintrc.js
@@ -0,0 +1,75 @@
+// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
+module.exports = {
+ parser: "@typescript-eslint/parser", // Specifies the ESLint parser
+ parserOptions: {
+ ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
+ sourceType: "module", // Allows for the use of imports
+ ecmaFeatures: {
+ jsx: true // Allows for the parsing of JSX
+ }
+ },
+ settings: {
+ react: {
+ version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
+ }
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
+ "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
+ ],
+ rules: {
+ // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ },
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ }
+ }
+ ]
+ };
\ No newline at end of file
diff --git a/samples/inputs/switches/enabled/README.md b/samples/inputs/switches/enabled/README.md
new file mode 100644
index 0000000000..d2e32ff8a2
--- /dev/null
+++ b/samples/inputs/switches/enabled/README.md
@@ -0,0 +1,56 @@
+
+
+
+This folder contains implementation of React application with example of Enabled feature using [Switches](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Branches
+
+> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
+
+## Instructions
+
+Follow these instructions to run this example:
+
+
+```
+git clone https://github.com/IgniteUI/igniteui-react-examples.git
+git checkout master
+cd ./igniteui-react-examples
+cd ./samples/inputs/switches/enabled
+```
+
+open above folder in VS Code or type:
+```
+code .
+```
+
+In terminal window, run:
+```
+npm install --legacy-peer-deps
+npm run-script start
+```
+
+Then open http://localhost:4200/ in your browser
+
+
+## Learn More
+
+To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
diff --git a/samples/inputs/switches/checking/index.html b/samples/inputs/switches/enabled/index.html
similarity index 88%
rename from samples/inputs/switches/checking/index.html
rename to samples/inputs/switches/enabled/index.html
index 304d0bb440..d5f3c7421f 100644
--- a/samples/inputs/switches/checking/index.html
+++ b/samples/inputs/switches/enabled/index.html
@@ -1,7 +1,7 @@
-
SwitchChecking
+
SwitchEnabled
diff --git a/samples/inputs/switches/checking/package.json b/samples/inputs/switches/enabled/package.json
similarity index 87%
rename from samples/inputs/switches/checking/package.json
rename to samples/inputs/switches/enabled/package.json
index 035625c19a..0ee6989e41 100644
--- a/samples/inputs/switches/checking/package.json
+++ b/samples/inputs/switches/enabled/package.json
@@ -1,6 +1,6 @@
{
- "name": "react-switch-checking",
- "description": "This project provides example of Switch Checking using Infragistics React components",
+ "name": "react-switch-enabled",
+ "description": "This project provides example of Switch Enabled using Infragistics React components",
"author": "Infragistics",
"homepage": ".",
"version": "1.4.0",
diff --git a/samples/inputs/switches/checking/sandbox.config.json b/samples/inputs/switches/enabled/sandbox.config.json
similarity index 100%
rename from samples/inputs/switches/checking/sandbox.config.json
rename to samples/inputs/switches/enabled/sandbox.config.json
diff --git a/samples/inputs/switches/enabled/src/index.css b/samples/inputs/switches/enabled/src/index.css
new file mode 100644
index 0000000000..379ecd447f
--- /dev/null
+++ b/samples/inputs/switches/enabled/src/index.css
@@ -0,0 +1,33 @@
+/* shared styles are loaded from: */
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
+
+.states {
+ display: grid;
+ grid-template-columns: repeat(4, auto);
+ align-items: center;
+ gap: 32px;
+
+ & :is(.states__column, .states__row) {
+ font: 500 14px / 24px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.1px;
+ color: var(--ig-gray-600);
+ }
+
+ & .states__column {
+ text-align: center;
+ }
+
+ & .states__row {
+ text-align: end;
+ }
+
+ & igc-switch {
+ justify-self: center;
+ }
+}
diff --git a/samples/inputs/switches/enabled/src/index.tsx b/samples/inputs/switches/enabled/src/index.tsx
new file mode 100644
index 0000000000..24bf4a3151
--- /dev/null
+++ b/samples/inputs/switches/enabled/src/index.tsx
@@ -0,0 +1,45 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import { IgrSwitch } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+export default function SwitchEnabled() {
+
+ return (
+
+
+
+ Hover
+ Focused
+ Focused & Hover
+
+ Enabled / On
+
+ Power
+
+
+ Power
+
+
+ Power
+
+
+ Enabled / Off
+
+ Power
+
+
+ Power
+
+
+ Power
+
+
+
+ );
+}
+
+// rendering above component to the React DOM
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
);
diff --git a/samples/inputs/switches/enabled/tsconfig.json b/samples/inputs/switches/enabled/tsconfig.json
new file mode 100644
index 0000000000..e7db8a94f5
--- /dev/null
+++ b/samples/inputs/switches/enabled/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/inputs/switches/checking/vite.config.js b/samples/inputs/switches/enabled/vite.config.js
similarity index 100%
rename from samples/inputs/switches/checking/vite.config.js
rename to samples/inputs/switches/enabled/vite.config.js
diff --git a/samples/inputs/switches/label/src/SwitchLabelStyles.css b/samples/inputs/switches/label/src/SwitchLabelStyles.css
deleted file mode 100644
index 21bf881ab2..0000000000
--- a/samples/inputs/switches/label/src/SwitchLabelStyles.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.wrapper {
- display: flex;
- align-items: center;
- gap: 0.5rem;
-}
\ No newline at end of file
diff --git a/samples/inputs/switches/label/src/index.css b/samples/inputs/switches/label/src/index.css
deleted file mode 100644
index 1f53b8aa05..0000000000
--- a/samples/inputs/switches/label/src/index.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* shared styles are loaded from: */
-/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
\ No newline at end of file
diff --git a/samples/inputs/switches/label/src/index.tsx b/samples/inputs/switches/label/src/index.tsx
deleted file mode 100644
index 39ae73b8c9..0000000000
--- a/samples/inputs/switches/label/src/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import './index.css';
-import './SwitchLabelStyles.css';
-import { IgrSwitch } from 'igniteui-react';
-import 'igniteui-webcomponents/themes/light/bootstrap.css';
-
-export default function SwitchLabel() {
-
- return (
-
- );
-}
-
-// rendering above component to the React DOM
-const root = ReactDOM.createRoot(document.getElementById('root'));
-root.render(
);
diff --git a/samples/inputs/switches/label/.devcontainer/devcontainer.json b/samples/inputs/switches/layout/.devcontainer/devcontainer.json
similarity index 100%
rename from samples/inputs/switches/label/.devcontainer/devcontainer.json
rename to samples/inputs/switches/layout/.devcontainer/devcontainer.json
diff --git a/samples/inputs/switches/layout/.eslintrc.js b/samples/inputs/switches/layout/.eslintrc.js
new file mode 100644
index 0000000000..b45160a9ee
--- /dev/null
+++ b/samples/inputs/switches/layout/.eslintrc.js
@@ -0,0 +1,75 @@
+// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
+module.exports = {
+ parser: "@typescript-eslint/parser", // Specifies the ESLint parser
+ parserOptions: {
+ ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
+ sourceType: "module", // Allows for the use of imports
+ ecmaFeatures: {
+ jsx: true // Allows for the parsing of JSX
+ }
+ },
+ settings: {
+ react: {
+ version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
+ }
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
+ "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
+ ],
+ rules: {
+ // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ },
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ }
+ }
+ ]
+ };
\ No newline at end of file
diff --git a/samples/inputs/switches/label/README.md b/samples/inputs/switches/layout/README.md
similarity index 86%
rename from samples/inputs/switches/label/README.md
rename to samples/inputs/switches/layout/README.md
index 7dbefe7c58..f8eedc8414 100644
--- a/samples/inputs/switches/label/README.md
+++ b/samples/inputs/switches/layout/README.md
@@ -1,7 +1,7 @@
-This folder contains implementation of React application with example of Label feature using [Switches](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+This folder contains implementation of React application with example of Layout feature using [Switches](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
@@ -12,10 +12,10 @@ This folder contains implementation of React application with example of Label f
-
+
-
+
@@ -34,7 +34,7 @@ Follow these instructions to run this example:
git clone https://github.com/IgniteUI/igniteui-react-examples.git
git checkout master
cd ./igniteui-react-examples
-cd ./samples/inputs/switches/label
+cd ./samples/inputs/switches/layout
```
open above folder in VS Code or type:
diff --git a/samples/inputs/switches/label/index.html b/samples/inputs/switches/layout/index.html
similarity index 88%
rename from samples/inputs/switches/label/index.html
rename to samples/inputs/switches/layout/index.html
index a5c362fa44..4ae350158f 100644
--- a/samples/inputs/switches/label/index.html
+++ b/samples/inputs/switches/layout/index.html
@@ -1,7 +1,7 @@
-
SwitchLabel
+
SwitchLayout
diff --git a/samples/inputs/switches/layout/package.json b/samples/inputs/switches/layout/package.json
new file mode 100644
index 0000000000..41ccf6d2c2
--- /dev/null
+++ b/samples/inputs/switches/layout/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "react-switch-layout",
+ "description": "This project provides example of Switch Layout using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/inputs/switches/label/sandbox.config.json b/samples/inputs/switches/layout/sandbox.config.json
similarity index 100%
rename from samples/inputs/switches/label/sandbox.config.json
rename to samples/inputs/switches/layout/sandbox.config.json
diff --git a/samples/inputs/switches/layout/src/index.css b/samples/inputs/switches/layout/src/index.css
new file mode 100644
index 0000000000..3b71591b7c
--- /dev/null
+++ b/samples/inputs/switches/layout/src/index.css
@@ -0,0 +1,29 @@
+/* shared styles are loaded from: */
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
+
+.variants {
+ --variant-gap: 60px;
+ --label-gap: 30px;
+
+ display: flex;
+ align-items: center;
+ gap: var(--variant-gap);
+
+ & .variants__item {
+ display: flex;
+ align-items: center;
+ gap: var(--label-gap);
+ }
+
+ & .variants__label {
+ font: 500 14px / 24px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.1px;
+ color: var(--ig-gray-600);
+ }
+}
diff --git a/samples/inputs/switches/layout/src/index.tsx b/samples/inputs/switches/layout/src/index.tsx
new file mode 100644
index 0000000000..6625efd335
--- /dev/null
+++ b/samples/inputs/switches/layout/src/index.tsx
@@ -0,0 +1,31 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import { IgrSwitch } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+export default function SwitchLayout() {
+
+ return (
+
+
+
+ Label Before
+
+ Power
+
+
+
+ Label After
+
+ Power
+
+
+
+
+ );
+}
+
+// rendering above component to the React DOM
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
);
diff --git a/samples/inputs/switches/layout/tsconfig.json b/samples/inputs/switches/layout/tsconfig.json
new file mode 100644
index 0000000000..e7db8a94f5
--- /dev/null
+++ b/samples/inputs/switches/layout/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/inputs/switches/label/vite.config.js b/samples/inputs/switches/layout/vite.config.js
similarity index 100%
rename from samples/inputs/switches/label/vite.config.js
rename to samples/inputs/switches/layout/vite.config.js
diff --git a/samples/inputs/switches/overview/src/index.css b/samples/inputs/switches/overview/src/index.css
index 1f53b8aa05..38aea371df 100644
--- a/samples/inputs/switches/overview/src/index.css
+++ b/samples/inputs/switches/overview/src/index.css
@@ -1,2 +1,59 @@
/* shared styles are loaded from: */
-/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
\ No newline at end of file
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
+
+.notifications {
+ inline-size: 100%;
+ max-inline-size: 384px;
+ background: var(--ig-surface-500);
+ border-radius: 4px;
+ overflow: hidden;
+
+ & .notifications__title {
+ margin: 0;
+ padding: 16px;
+ font: 400 10px / 16px "Titillium Web", sans-serif;
+ letter-spacing: 1.5px;
+ text-transform: uppercase;
+ color: var(--ig-primary-500);
+ }
+
+ & .notifications__row {
+ padding-block: 12px;
+ padding-inline: 16px;
+
+ & igc-switch {
+ display: block;
+ inline-size: 100%;
+
+ &::part(base) {
+ inline-size: 100%;
+ justify-content: space-between;
+ gap: 16px;
+ }
+ }
+ }
+}
+
+.option {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ text-align: start;
+ white-space: normal;
+
+ & .option__label {
+ font-size: 16px;
+ color: var(--ig-gray-900);
+ }
+
+ & .option__hint {
+ font-size: 13px;
+ color: var(--ig-gray-700);
+ }
+}
\ No newline at end of file
diff --git a/samples/inputs/switches/overview/src/index.tsx b/samples/inputs/switches/overview/src/index.tsx
index ea33b4c482..4e73359bc9 100644
--- a/samples/inputs/switches/overview/src/index.tsx
+++ b/samples/inputs/switches/overview/src/index.tsx
@@ -8,7 +8,33 @@ export default function SwitchOverview() {
return (
-
+
+
Notifications
+
+
+
+ Push notifications
+ Deliver alerts to this device
+
+
+
+
+
+
+ Weekly digest
+ Summary email every Monday
+
+
+
+
+
+
+ SMS alerts
+ Unavailable on your plan
+
+
+
+
);
}
diff --git a/samples/inputs/switches/selected/.devcontainer/devcontainer.json b/samples/inputs/switches/selected/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..e0b8e9c925
--- /dev/null
+++ b/samples/inputs/switches/selected/.devcontainer/devcontainer.json
@@ -0,0 +1,4 @@
+{
+ "name": "Node.js",
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:22"
+}
\ No newline at end of file
diff --git a/samples/inputs/switches/selected/.eslintrc.js b/samples/inputs/switches/selected/.eslintrc.js
new file mode 100644
index 0000000000..b45160a9ee
--- /dev/null
+++ b/samples/inputs/switches/selected/.eslintrc.js
@@ -0,0 +1,75 @@
+// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
+module.exports = {
+ parser: "@typescript-eslint/parser", // Specifies the ESLint parser
+ parserOptions: {
+ ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
+ sourceType: "module", // Allows for the use of imports
+ ecmaFeatures: {
+ jsx: true // Allows for the parsing of JSX
+ }
+ },
+ settings: {
+ react: {
+ version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
+ }
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
+ "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
+ ],
+ rules: {
+ // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ },
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ }
+ }
+ ]
+ };
\ No newline at end of file
diff --git a/samples/inputs/switches/checking/README.md b/samples/inputs/switches/selected/README.md
similarity index 91%
rename from samples/inputs/switches/checking/README.md
rename to samples/inputs/switches/selected/README.md
index b8edb447c9..5895b10d6c 100644
--- a/samples/inputs/switches/checking/README.md
+++ b/samples/inputs/switches/selected/README.md
@@ -1,7 +1,7 @@
-This folder contains implementation of React application with example of Checking feature using [Switches](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+This folder contains implementation of React application with example of Selected feature using [Switches](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
@@ -12,10 +12,10 @@ This folder contains implementation of React application with example of Checkin
-
+
-
+
@@ -34,7 +34,7 @@ Follow these instructions to run this example:
git clone https://github.com/IgniteUI/igniteui-react-examples.git
git checkout master
cd ./igniteui-react-examples
-cd ./samples/inputs/switches/checking
+cd ./samples/inputs/switches/selected
```
open above folder in VS Code or type:
diff --git a/samples/inputs/switches/selected/index.html b/samples/inputs/switches/selected/index.html
new file mode 100644
index 0000000000..8450fca17b
--- /dev/null
+++ b/samples/inputs/switches/selected/index.html
@@ -0,0 +1,11 @@
+
+
+
+
SwitchSelected
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/inputs/switches/selected/package.json b/samples/inputs/switches/selected/package.json
new file mode 100644
index 0000000000..e697c1bedf
--- /dev/null
+++ b/samples/inputs/switches/selected/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "react-switch-selected",
+ "description": "This project provides example of Switch Selected using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/inputs/switches/selected/sandbox.config.json b/samples/inputs/switches/selected/sandbox.config.json
new file mode 100644
index 0000000000..00acba0c10
--- /dev/null
+++ b/samples/inputs/switches/selected/sandbox.config.json
@@ -0,0 +1,5 @@
+{
+ "infiniteLoopProtection": false,
+ "hardReloadOnChange": false,
+ "view": "browser"
+}
\ No newline at end of file
diff --git a/samples/inputs/switches/selected/src/index.css b/samples/inputs/switches/selected/src/index.css
new file mode 100644
index 0000000000..32f67af851
--- /dev/null
+++ b/samples/inputs/switches/selected/src/index.css
@@ -0,0 +1,26 @@
+/* shared styles are loaded from: */
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
+
+.states {
+ display: grid;
+ grid-template-columns: repeat(3, auto);
+ align-items: center;
+ gap: 32px;
+
+ & .states__row {
+ text-align: end;
+ font: 500 14px / 24px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.1px;
+ color: var(--ig-gray-600);
+ }
+
+ & .states__disabled {
+ margin-inline-start: 16px;
+ }
+}
diff --git a/samples/inputs/switches/selected/src/index.tsx b/samples/inputs/switches/selected/src/index.tsx
new file mode 100644
index 0000000000..89a8b56136
--- /dev/null
+++ b/samples/inputs/switches/selected/src/index.tsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import { IgrSwitch } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+export default function SwitchSelected() {
+
+ return (
+
+
+ On
+
+ Power
+
+
+ Power
+
+
+ Off
+
+ Power
+
+
+ Power
+
+
+
+ );
+}
+
+// rendering above component to the React DOM
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
);
diff --git a/samples/inputs/switches/selected/tsconfig.json b/samples/inputs/switches/selected/tsconfig.json
new file mode 100644
index 0000000000..e7db8a94f5
--- /dev/null
+++ b/samples/inputs/switches/selected/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/inputs/switches/selected/vite.config.js b/samples/inputs/switches/selected/vite.config.js
new file mode 100644
index 0000000000..1744dbc719
--- /dev/null
+++ b/samples/inputs/switches/selected/vite.config.js
@@ -0,0 +1,12 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ plugins: [react()],
+ build: {
+ outDir: 'build'
+ },
+ server: {
+ open: false
+ },
+});
\ No newline at end of file
diff --git a/samples/inputs/switches/styling/src/index.css b/samples/inputs/switches/styling/src/index.css
index fc42274b5e..66e5527723 100644
--- a/samples/inputs/switches/styling/src/index.css
+++ b/samples/inputs/switches/styling/src/index.css
@@ -1,10 +1,100 @@
/* shared styles are loaded from: */
/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
- igc-switch {
- --thumb-on-color: white;
- --thumb-off-color: var(--ig-success-500);
- --track-on-color: var(--ig-success-500); /* Background color when checked */
- --track-off-color: white; /* Background color when unchecked */
- --track-on-hover-color: var(--ig-success-500); /* Background hover color when checked */
- }
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
+
+.security {
+ display: block;
+ inline-size: 100%;
+ max-inline-size: 348px;
+ background: var(--ig-surface-500);
+ border: 1px solid var(--ig-gray-300);
+ border-radius: 16px;
+ box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
+ overflow: hidden;
+
+ &::part(header) {
+ padding: 16px;
+ padding-inline-end: 6px;
+ gap: 16px;
+ }
+
+ &[open]::part(header) {
+ border-block-end: 1px solid var(--ig-gray-300);
+ }
+
+ &::part(indicator) {
+ transform: none;
+ }
+
+ &::part(content) {
+ padding-left: 5px;
+ }
+
+ & igc-switch {
+ display: block;
+ inline-size: 60px;
+ block-size: 40px;
+
+ &::part(base) {
+ inline-size: 60px;
+ block-size: 40px;
+ justify-content: center;
+ align-items: center;
+ overflow: visible;
+ }
+
+ &::part(control) {
+ overflow: visible;
+ }
+ }
+
+ & igc-radio-group {
+ display: flex;
+ flex-direction: column;
+ gap: 24px;
+ margin-inline-start: 0;
+ }
+
+ & igc-radio {
+ font: 600 12px / 16px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.15px;
+ color: var(--ig-primary-900);
+
+ &::part(label) {
+ padding-inline-start: 4px;
+ }
+
+ &::part(control) {
+ transform: translateX(-4px);
+ --fill-color: var(--ig-primary-500);
+ --fill-color-border: var(--ig-primary-500);
+ --fill-color-hover: var(--ig-primary-500);
+ --fill-hover-border-color: var(--ig-primary-500);
+ }
+ }
+}
+
+.option {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ text-align: start;
+ white-space: normal;
+
+ & .option__label {
+ font: 600 16px / 24px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.15px;
+ color: var(--ig-gray-700);
+ }
+
+ & .option__hint {
+ font: 500 14px / 24px "Aktiv Grotesk", sans-serif;
+ letter-spacing: 0.1px;
+ color: var(--ig-gray-600);
+ }
+}
diff --git a/samples/inputs/switches/styling/src/index.tsx b/samples/inputs/switches/styling/src/index.tsx
index db4492f79e..0674c6726e 100644
--- a/samples/inputs/switches/styling/src/index.tsx
+++ b/samples/inputs/switches/styling/src/index.tsx
@@ -1,14 +1,32 @@
-import React from 'react';
+import React, { useState } from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
-import { IgrSwitch } from 'igniteui-react';
+import { IgrSwitch, IgrRadio, IgrRadioGroup, IgrExpansionPanel } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';
export default function SwitchStyling() {
+ const [open, setOpen] = useState(true);
return (
-
Label
+ {/* a click on the switch bubbles up to the panel header, so only the open state has to be mirrored back */}
+
setOpen(true)}
+ onClosed={() => setOpen(false)}>
+
+ Two-factor authentication
+ Extra sign-in verification
+
+
+
+ Authenticator app
+ Security key
+ Backup codes
+
+
);
}
diff --git a/samples/inputs/switches/tailwind-styling/.devcontainer/devcontainer.json b/samples/inputs/switches/tailwind-styling/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..e0b8e9c925
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/.devcontainer/devcontainer.json
@@ -0,0 +1,4 @@
+{
+ "name": "Node.js",
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:22"
+}
\ No newline at end of file
diff --git a/samples/inputs/switches/tailwind-styling/.eslintrc.js b/samples/inputs/switches/tailwind-styling/.eslintrc.js
new file mode 100644
index 0000000000..b45160a9ee
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/.eslintrc.js
@@ -0,0 +1,75 @@
+// https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project
+module.exports = {
+ parser: "@typescript-eslint/parser", // Specifies the ESLint parser
+ parserOptions: {
+ ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
+ sourceType: "module", // Allows for the use of imports
+ ecmaFeatures: {
+ jsx: true // Allows for the parsing of JSX
+ }
+ },
+ settings: {
+ react: {
+ version: "999.999.999" // Tells eslint-plugin-react to automatically detect the version of React to use
+ }
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
+ "plugin:@typescript-eslint/recommended" // Uses the recommended rules from @typescript-eslint/eslint-plugin
+ ],
+ rules: {
+ // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ },
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "default-case": "off",
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "no-extend-native": "off",
+ "no-throw-literal": "off",
+ "no-useless-concat": "off",
+ "no-mixed-operators": "off",
+ "no-prototype-builtins": "off",
+ "prefer-const": "off",
+ "prefer-rest-params": "off",
+ "jsx-a11y/alt-text": "off",
+ "jsx-a11y/iframe-has-title": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-inferrable-types": "off",
+ "@typescript-eslint/no-useless-constructor": "off",
+ "@typescript-eslint/no-use-before-define": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/interface-name-prefix": "off",
+ "@typescript-eslint/prefer-namespace-keyword": "off",
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ }
+ }
+ ]
+ };
\ No newline at end of file
diff --git a/samples/inputs/switches/tailwind-styling/README.md b/samples/inputs/switches/tailwind-styling/README.md
new file mode 100644
index 0000000000..f46ca8e656
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/README.md
@@ -0,0 +1,56 @@
+
+
+
+This folder contains implementation of React application with example of Tailwind Styling feature using [Switches](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Branches
+
+> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
+
+## Instructions
+
+Follow these instructions to run this example:
+
+
+```
+git clone https://github.com/IgniteUI/igniteui-react-examples.git
+git checkout master
+cd ./igniteui-react-examples
+cd ./samples/inputs/switches/tailwind-styling
+```
+
+open above folder in VS Code or type:
+```
+code .
+```
+
+In terminal window, run:
+```
+npm install --legacy-peer-deps
+npm run-script start
+```
+
+Then open http://localhost:4200/ in your browser
+
+
+## Learn More
+
+To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
diff --git a/samples/inputs/switches/tailwind-styling/index.html b/samples/inputs/switches/tailwind-styling/index.html
new file mode 100644
index 0000000000..c0a13703ee
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/index.html
@@ -0,0 +1,11 @@
+
+
+
+
SwitchTailwindStyling
+
+
+
+
+
+
+
diff --git a/samples/inputs/switches/tailwind-styling/package.json b/samples/inputs/switches/tailwind-styling/package.json
new file mode 100644
index 0000000000..f5c00e039d
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "react-switch-tailwind-styling",
+ "description": "This project provides example of Switch Tailwind Styling using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@tailwindcss/vite": "^4.1.14",
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "tailwindcss": "^4.1.14",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/inputs/switches/tailwind-styling/sandbox.config.json b/samples/inputs/switches/tailwind-styling/sandbox.config.json
new file mode 100644
index 0000000000..00acba0c10
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/sandbox.config.json
@@ -0,0 +1,5 @@
+{
+ "infiniteLoopProtection": false,
+ "hardReloadOnChange": false,
+ "view": "browser"
+}
\ No newline at end of file
diff --git a/samples/inputs/switches/tailwind-styling/src/index.css b/samples/inputs/switches/tailwind-styling/src/index.css
new file mode 100644
index 0000000000..48aba56acb
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/src/index.css
@@ -0,0 +1,15 @@
+/* shared styles are loaded from: */
+/* https://dl.infragistics.com/x/css/samples/shared.v8.css */
+
+@layer theme, utilities;
+@import "tailwindcss/theme.css" layer(theme);
+@import "tailwindcss/utilities.css" layer(utilities);
+@source "./index.tsx";
+
+@custom-variant dark (&:where(.dark, .dark *));
+
+.container.sample {
+ display: flex;
+ place-content: center;
+ place-items: center;
+}
diff --git a/samples/inputs/switches/tailwind-styling/src/index.tsx b/samples/inputs/switches/tailwind-styling/src/index.tsx
new file mode 100644
index 0000000000..e82673e757
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/src/index.tsx
@@ -0,0 +1,43 @@
+import React, { useEffect, useState } from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import { IgrSwitch, IgrIcon, registerIconFromText } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+const darkModeIcon =
+ '
';
+
+export default function SwitchTailwindStyling(): JSX.Element {
+ const [isDarkMode, setIsDarkMode] = useState(true);
+
+ useEffect(() => {
+ registerIconFromText('dark_mode', darkModeIcon, 'material');
+ }, []);
+
+ return (
+
+
+
+ Dashboard
+ setIsDarkMode((current) => !current)} className="[--track-on-color:var(--color-blue-500)] [--track-off-color:var(--color-slate-600)] [--thumb-on-color:var(--color-white)] [--thumb-off-color:var(--color-slate-300)] [--track-on-hover-color:var(--color-blue-600)]">
+
+
+ Dark mode
+
+
+
+
+
Revenue overview
+
+ $84,290 this month, up 12% from July.
+ Your top-performing channel is Direct, driving 41% of total revenue.
+
+
+
+
+ );
+}
+
+// rendering above component to the React DOM
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
);
diff --git a/samples/inputs/switches/tailwind-styling/tsconfig.json b/samples/inputs/switches/tailwind-styling/tsconfig.json
new file mode 100644
index 0000000000..e7db8a94f5
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/inputs/switches/tailwind-styling/vite.config.js b/samples/inputs/switches/tailwind-styling/vite.config.js
new file mode 100644
index 0000000000..663868e022
--- /dev/null
+++ b/samples/inputs/switches/tailwind-styling/vite.config.js
@@ -0,0 +1,13 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import tailwindcss from '@tailwindcss/vite';
+
+export default defineConfig({
+ plugins: [react(), tailwindcss()],
+ build: {
+ outDir: 'build'
+ },
+ server: {
+ open: false
+ },
+});
\ No newline at end of file
diff --git a/samples/layouts/accordion/customization/src/AccordionCustomization.css b/samples/layouts/accordion/customization/src/AccordionCustomization.css
deleted file mode 100644
index 89acd44513..0000000000
--- a/samples/layouts/accordion/customization/src/AccordionCustomization.css
+++ /dev/null
@@ -1,35 +0,0 @@
-igc-accordion {
- width: 100%;
-}
-
-.sample-wrapper {
- overflow-y: auto;
- max-height: 530px;
- margin: 8px;
-}
-
-igc-range-slider {
- margin: 24px;
-}
-
-.categories-container {
- display: flex;
- flex-flow: column nowrap;
-}
-
-igc-checkbox,
-igc-radio {
- margin: 4px 0;
-}
-
-igc-expansion-panel {
- border: 1px solid rgba(174, 174, 174, 0.25);
-}
-
-igc-rating {
- flex-direction: row;
-}
-
-.size-small {
- --ig-size: var(--ig-size-small);
-}
diff --git a/samples/layouts/accordion/customization/src/index.css b/samples/layouts/accordion/customization/src/index.css
index e69de29bb2..af3552c32b 100644
--- a/samples/layouts/accordion/customization/src/index.css
+++ b/samples/layouts/accordion/customization/src/index.css
@@ -0,0 +1,66 @@
+.accordion-sample {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
+
+.accordion-content {
+ width: min(760px, 100%);
+ margin: 0 auto;
+ padding: 24px;
+ box-sizing: border-box;
+}
+
+.accordion-sample igc-accordion {
+ display: block;
+ border: 1px solid var(--ig-gray-300);
+ border-radius: 4px;
+}
+
+.panel-description {
+ margin: 0 0 16px;
+ color: var(--ig-gray-700);
+}
+
+.categories-container {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 8px 24px;
+ max-width: 520px;
+}
+
+.category-option,
+.rating-option {
+ margin: 4px 0;
+}
+
+.range-summary {
+ display: flex;
+ justify-content: space-between;
+ max-width: 560px;
+ margin-bottom: 4px;
+ font-weight: 600;
+}
+
+.cost-slider {
+ max-width: 560px;
+ margin: 8px 0 0;
+}
+
+.rating-options {
+ display: grid;
+ gap: 8px;
+ max-width: 360px;
+}
+
+.rating-control {
+ flex-direction: row;
+}
+
+.time-input {
+ max-width: 260px;
+}
+
+.size-small {
+ --ig-size: var(--ig-size-small);
+}
diff --git a/samples/layouts/accordion/customization/src/index.tsx b/samples/layouts/accordion/customization/src/index.tsx
index 8e138630bb..23b94cd758 100644
--- a/samples/layouts/accordion/customization/src/index.tsx
+++ b/samples/layouts/accordion/customization/src/index.tsx
@@ -1,7 +1,6 @@
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
-import "./AccordionCustomization.css";
import {
IgrAccordion,
IgrCheckbox,
@@ -22,6 +21,8 @@ import "igniteui-webcomponents/themes/light/bootstrap.css";
type Category = { checked: boolean; type: string };
+const ratingOptions = [2, 3, 4, 5];
+
const clearIcon =
"
";
const clockIcon =
@@ -37,6 +38,7 @@ export default class AccordionCustomization extends React.Component
{
];
private dateTimeInput: IgrDateTimeInput;
+ private transportationPanel: IgrExpansionPanel;
constructor(props: any) {
super(props);
@@ -44,7 +46,7 @@ export default class AccordionCustomization extends React.Component {
categories: this.categories,
cost: { lower: 200, upper: 800 },
rating: "",
- time: "Time",
+ time: "Any time",
};
this.categoriesChange = this.categoriesChange.bind(this);
@@ -53,30 +55,42 @@ export default class AccordionCustomization extends React.Component {
this.timeChange = this.timeChange.bind(this);
this.clearTime = this.clearTime.bind(this);
this.dateTimeInputRef = this.dateTimeInputRef.bind(this);
+ this.transportationPanelRef = this.transportationPanelRef.bind(this);
registerIconFromText("clear", clearIcon, "material");
registerIconFromText("clock", clockIcon, "material");
}
+ public componentDidMount() {
+ if (this.transportationPanel) {
+ this.transportationPanel.open = true;
+ }
+ }
+
public render(): JSX.Element {
+ const selectedCategories = this.state.categories
+ .filter((c: Category) => c.checked)
+ .map((c: Category) => c.type)
+ .join(", ");
+
return (
-
-
+
+
-
+
- Categories
- {this.state.categories.some((c: Category) => c.checked) && ": "}
- {this.state.categories
- .filter((c: Category) => c.checked)
- .map((c: Category) => c.type)
- .join(", ")}
+ Transportation{selectedCategories && `: ${selectedCategories}`}
+ Choose how you want to travel
+
+ Select one or more transportation options for your trip.
+
{this.state.categories.map((c: Category) => {
return (
this.categoriesChange(e, c.type)
@@ -91,11 +105,19 @@ export default class AccordionCustomization extends React.Component {
- Cost: ${this.state.cost.lower} to $
- {this.state.cost.upper}
+ Budget: ${this.state.cost.lower} - ${this.state.cost.upper}
+ Set the price range
+
+ Adjust the minimum and maximum cost for available options.
+
+
+ ${this.state.cost.lower}
+ ${this.state.cost.upper}
+
{
- Rating{this.state.rating && ": "}
+ Minimum Rating{this.state.rating && ": "}
{this.state.rating}
+ Filter by review score
-
- {[1, 2, 3, 4].map((rating) => {
+
+ Choose the lowest rating you want to include in the results.
+
+
+ {ratingOptions.map((rating) => {
return (
{
rating > 1 ? "s" : ""
} or more`}
max={5}
- value={rating + 0.5}
- className="size-small"
+ value={rating}
+ className="rating-control size-small"
readOnly={true}
>
@@ -136,11 +163,16 @@ export default class AccordionCustomization extends React.Component {
- {this.state.time}
+ Arrival Time
+ {this.state.time !== "Any time" && `: ${this.state.time}`}
+ Set the latest arrival time
+
+ Pick the latest acceptable arrival time for your trip.
+
{
const s = e.target as IgrDateTimeInput;
const result =
s.value !== null
- ? `Arrive before ${e.detail.toLocaleTimeString([], {
+ ? e.detail.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
- })}`
- : "Time";
+ })
+ : "Any time";
this.setState({
time: result,
});
@@ -207,7 +239,7 @@ export default class AccordionCustomization extends React.Component {
public clearTime() {
this.dateTimeInput.clear();
this.setState({
- time: "Time",
+ time: "Any time",
});
}
@@ -217,8 +249,14 @@ export default class AccordionCustomization extends React.Component {
}
this.dateTimeInput = input;
}
+
+ public transportationPanelRef(panel: IgrExpansionPanel) {
+ if (!panel) {
+ return;
+ }
+ this.transportationPanel = panel;
+ }
}
-// rendering above component to the React DOM
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render( );
diff --git a/samples/layouts/accordion/nested-scenario/src/AccordionNestedScenario.css b/samples/layouts/accordion/nested-scenario/src/AccordionNestedScenario.css
deleted file mode 100644
index 2eb281b0e4..0000000000
--- a/samples/layouts/accordion/nested-scenario/src/AccordionNestedScenario.css
+++ /dev/null
@@ -1,17 +0,0 @@
-igc-accordion {
- width: 100%;
-}
-
-.sample-wrapper {
- overflow-y: auto;
- max-height: 470px;
- margin: 8px;
-}
-
-igc-switch {
- padding: 16px;
-}
-
-igc-expansion-panel {
- border: 1px solid rgba(174, 174, 174, 0.25);
-}
diff --git a/samples/layouts/accordion/nested-scenario/src/index.css b/samples/layouts/accordion/nested-scenario/src/index.css
index e69de29bb2..091f1b043c 100644
--- a/samples/layouts/accordion/nested-scenario/src/index.css
+++ b/samples/layouts/accordion/nested-scenario/src/index.css
@@ -0,0 +1,24 @@
+.accordion-sample {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
+
+.accordion-content {
+ width: min(760px, 100%);
+ margin: 0 auto;
+ padding: 24px;
+ box-sizing: border-box;
+}
+
+.accordion-toolbar {
+ display: flex;
+ justify-content: flex-end;
+ margin-bottom: 12px;
+}
+
+.accordion-sample igc-accordion {
+ display: block;
+ border: 1px solid var(--ig-gray-300);
+ border-radius: 4px;
+}
diff --git a/samples/layouts/accordion/nested-scenario/src/index.tsx b/samples/layouts/accordion/nested-scenario/src/index.tsx
index 8d7a68fbac..809eb67c19 100644
--- a/samples/layouts/accordion/nested-scenario/src/index.tsx
+++ b/samples/layouts/accordion/nested-scenario/src/index.tsx
@@ -1,75 +1,97 @@
-import React, { useState } from 'react';
-import ReactDOM from 'react-dom/client';
-import './index.css';
-import './AccordionNestedScenario.css';
+import React, { useRef } from "react";
+import ReactDOM from "react-dom/client";
+import "./index.css";
import {
- IgrAccordion, IgrExpansionPanel, IgrSwitch,
- IgrCheckboxChangeEventArgs
-} from 'igniteui-react';
-import 'igniteui-webcomponents/themes/light/bootstrap.css';
+ IgrAccordion,
+ IgrCheckboxChangeEventArgs,
+ IgrExpansionPanel,
+ IgrSwitch,
+} from "igniteui-react";
+import "igniteui-webcomponents/themes/light/bootstrap.css";
export default function AccordionNestedScenario() {
+ const outerAccordionRef = useRef(null);
+ const innerAccordionRef = useRef(null);
- const [singleExpand, setSingleExpand] = useState(false);
-
- const switchChange = (e: IgrCheckboxChangeEventArgs) => {
- setSingleExpand(e.detail.checked);
+ const switchChange = (e: IgrCheckboxChangeEventArgs) => {
+ const { checked } = e.detail;
+
+ if (outerAccordionRef.current) {
+ outerAccordionRef.current.singleExpand = checked;
+ }
+
+ if (innerAccordionRef.current) {
+ innerAccordionRef.current.singleExpand = checked;
}
+ };
- return (
-
-
Single Expand
-
-
-
- Common questions about renewal.
-
-
-
- What happens if I don't renew my subscription?
- Any unlicensed or trial versions of Ignite UI for Angular, React and Web Components will now include this watermark.
-
-
- If I don't renew my subscription will I still have access to previous versions of Infragistics products?
- Any version of Infragistics software which you have downloaded can continue to be used perpetually. Access to download any new or
- previous versions through our customer portal and package feeds will require maintaining an active subscription by continuing
- to renew it.
-
-
- Will I be automatically charged for my renewal/ Can I be automatically charged for renewal?
- Any new subscriptions purchased online, via our eCommerce system, will renew automatically. Subscription renewal can be canceled,
- at any time, before the next automatic renewal date. Subscriptions purchased directly from Infragistics or Infragistics' partners are
- subject to the renewal terms that were agreed upon as part of that purchase.
-
-
-
-
-
- What has changed about subscription and pricing model?
- We have moved to a subscription-based pricing model for all our developer tools. This makes it easier
- for you to manage your license subscriptions and allows us to provide a better level of service for you. We
- updated our pricing and packages to provide you with flexible options and the best value. This includes Ignite UI
- (formerly Ignite UI for JavaScript) which includes all of our JavaScript framework components for web development,
- including: Angular, ASP.NET (Core and MVC), Blazor, JQuery, React and Web Components, as well as Infragistics Professional,
- Infragistics Ultimate, our Ultimate UI products. We also offer multi-year subscriptions options with a built-in discount,
- so you can see the value up front. With these updates we are confident that we are providing the best platforms and the best
- price.
-
-
- Who will the updated changes impact?
- The license updates will impact all new and current customers using Ignite UI, Infragistics Professional and
- Infragistics Ultimate. Specifically, we have also made updates to our product and packaging for Ignite UI for JavaScript,
- Ignite UI for Angular, Ignite UI for React and Ignite UI for Web components. For more information, please refer to this
- blog: Announcement: Changes to Ignite UI Product & Packaging The pricing has been updated for all products and packages.
- So, all new or additional licenses will be sold based on our new pricing and packages. All existing license agreements will
- be honored and renewed based upon the current agreement.
-
-
-
+ return (
+
+
+
+
+ Single Expand
+
- );
+
+
+
+ Workspace Settings
+
+ Nested account, access, and billing options
+
+
+
+
+ Profile
+ Name, photo, and contact details
+
+ Update the public information shown to other workspace
+ members.
+
+
+
+
+ Security
+ Password and sign-in preferences
+
+ Review active sessions, change your password, and configure
+ sign-in requirements.
+
+
+
+
+ Notifications
+ Email and product updates
+
+ Choose the messages you receive for comments, assignments, and
+ releases.
+
+
+
+
+
+
+ Team Access
+ Members, roles, and permissions
+
+ Invite teammates, assign roles, and review workspace permissions.
+
+
+
+
+ Billing
+ Plan, invoices, and payment method
+
+ Manage subscription details, billing contacts, and invoice
+ delivery.
+
+
+
+
+
+ );
}
-// rendering above component to the React DOM
-const root = ReactDOM.createRoot(document.getElementById('root'));
+const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
);
diff --git a/samples/layouts/accordion/overview/src/AccordionOverview.css b/samples/layouts/accordion/overview/src/AccordionOverview.css
deleted file mode 100644
index 816b7feede..0000000000
--- a/samples/layouts/accordion/overview/src/AccordionOverview.css
+++ /dev/null
@@ -1,17 +0,0 @@
-igc-accordion {
- width: 100%;
-}
-
-.sample-wrapper {
- overflow-y: auto;
- max-height: 380px;
- margin: 8px;
-}
-
-igc-switch {
- padding: 16px;
-}
-
-igc-expansion-panel {
- border: 1px solid rgba(174, 174, 174, 0.25);
-}
diff --git a/samples/layouts/accordion/overview/src/index.css b/samples/layouts/accordion/overview/src/index.css
index e69de29bb2..f6a5352f94 100644
--- a/samples/layouts/accordion/overview/src/index.css
+++ b/samples/layouts/accordion/overview/src/index.css
@@ -0,0 +1,24 @@
+.accordion-sample {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
+
+.accordion-content {
+ width: min(720px, 100%);
+ margin: 0 auto;
+ padding: 24px;
+ box-sizing: border-box;
+}
+
+.accordion-toolbar {
+ display: flex;
+ justify-content: flex-end;
+ margin-bottom: 12px;
+}
+
+.accordion-sample igc-accordion {
+ display: block;
+ border: 1px solid var(--ig-gray-300);
+ border-radius: 4px;
+}
diff --git a/samples/layouts/accordion/overview/src/index.tsx b/samples/layouts/accordion/overview/src/index.tsx
index cd982a3bd7..a0dfa46bfd 100644
--- a/samples/layouts/accordion/overview/src/index.tsx
+++ b/samples/layouts/accordion/overview/src/index.tsx
@@ -1,68 +1,53 @@
-import React, { useState } from 'react';
+import React, { useRef } from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
-import './AccordionOverview.css';
import {
- IgrAccordion, IgrExpansionPanel, IgrSwitch,
- IgrCheckboxChangeEventArgs } from 'igniteui-react';
+ IgrAccordion,
+ IgrCheckboxChangeEventArgs,
+ IgrExpansionPanel,
+ IgrSwitch
+} from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';
export default function AccordionOverview() {
-
- const [singleExpand, setSingleExpand] = useState
(false);
+ const accordionRef = useRef(null);
const switchChange = (e: IgrCheckboxChangeEventArgs) => {
- setSingleExpand(e.detail.checked);
- }
-
+ if (accordionRef.current) {
+ accordionRef.current.singleExpand = e.detail.checked;
+ }
+ };
+
return (
-
-
Single Expand
-
-
-
- What has changed about subscription and pricing model?
- We have moved to a subscription-based pricing model for all our developer tools. This makes it easier
- for you to manage your license subscriptions and allows us to provide a better level of service for you. We
- updated our pricing and packages to provide you with flexible options and the best value. This includes Ignite UI
- (formerly Ignite UI for JavaScript) which includes all of our JavaScript framework components for web development,
- including: Angular, ASP.NET (Core and MVC), Blazor, JQuery, React and Web Components, as well as Infragistics Professional,
- Infragistics Ultimate, our Ultimate UI products. We also offer multi-year subscriptions options with a built-in discount,
- so you can see the value up front. With these updates we are confident that we are providing the best platforms and the best
- price.
-
-
- Who will the updated changes impact?
- The license updates will impact all new and current customers using Ignite UI, Infragistics Professional and
- Infragistics Ultimate. Specifically, we have also made updates to our product and packaging for Ignite UI for JavaScript,
- Ignite UI for Angular, Ignite UI for React and Ignite UI for Web components. For more information, please refer to this
- blog: Announcement: Changes to Ignite UI Product & Packaging The pricing has been updated for all products and packages.
- So, all new or additional licenses will be sold based on our new pricing and packages. All existing license agreements will
- be honored and renewed based upon the current agreement.
-
-
- What is the difference between your old model and your current subscription model for Ignite UI?
- For Ignite UI customers, we are moving away from NPM for licensed packages. The current NPM packages will be replaced with
- packages that include a “Trial Version” watermark. Licensed packages for Ignite UI will be available from our cloud hosted ProGet
- server. For more information, please refer to this article: Moving from Trial to Licensed Ignite UI NPM Packages
+
+
+
+
+ Single Expand
+
+
+
+
+
+ Account
+ Profile and security settings
+ Update your profile details, password, and sign-in preferences.
- What happens if I don't renew my subscription?
- Any unlicensed or trial versions of Ignite UI for Angular, React and Web Components will now include this watermark.
+ Notifications
+ Email and product updates
+ Choose which notifications you receive and how often they are delivered.
- If I don't renew my subscription will I still have access to previous versions of Infragistics products?
- Any version of Infragistics software which you have downloaded can continue to be used perpetually. Access to download any new or
- previous versions through our customer portal and package feeds will require maintaining an active subscription by continuing
- to renew it.
+ Billing
+ Payment and invoice settings
+ Manage payment methods, billing contacts, and invoice delivery options.
-
);
}
-// rendering above component to the React DOM
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( );
diff --git a/samples/layouts/accordion/programmatic-expansion/README.md b/samples/layouts/accordion/programmatic-expansion/README.md
new file mode 100644
index 0000000000..5ee8cc0584
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/README.md
@@ -0,0 +1,56 @@
+
+
+
+This folder contains implementation of React application with example of Programmatic Expansion feature using [Accordion](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Branches
+
+> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
+
+## Instructions
+
+Follow these instructions to run this example:
+
+
+```
+git clone https://github.com/IgniteUI/igniteui-react-examples.git
+git checkout master
+cd ./igniteui-react-examples
+cd ./samples/layouts/accordion/programmatic-expansion
+```
+
+open above folder in VS Code or type:
+```
+code .
+```
+
+In terminal window, run:
+```
+npm install --legacy-peer-deps
+npm run-script start
+```
+
+Then open http://localhost:4200/ in your browser
+
+
+## Learn More
+
+To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
diff --git a/samples/layouts/accordion/programmatic-expansion/index.html b/samples/layouts/accordion/programmatic-expansion/index.html
new file mode 100644
index 0000000000..050be7adb0
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/index.html
@@ -0,0 +1,11 @@
+
+
+
+ Accordion Programmatic Expansion
+
+
+
+
+
+
+
diff --git a/samples/layouts/accordion/programmatic-expansion/package.json b/samples/layouts/accordion/programmatic-expansion/package.json
new file mode 100644
index 0000000000..de10646370
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "react-accordion-programmatic-expansion",
+ "description": "This project provides example of Accordion Programmatic Expansion using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/layouts/accordion/programmatic-expansion/sandbox.config.json b/samples/layouts/accordion/programmatic-expansion/sandbox.config.json
new file mode 100644
index 0000000000..f8b5562bd6
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/sandbox.config.json
@@ -0,0 +1,5 @@
+{
+ "infiniteLoopProtection": false,
+ "hardReloadOnChange": false,
+ "view": "browser"
+}
diff --git a/samples/layouts/accordion/programmatic-expansion/src/index.css b/samples/layouts/accordion/programmatic-expansion/src/index.css
new file mode 100644
index 0000000000..0d434aede3
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/src/index.css
@@ -0,0 +1,29 @@
+.accordion-sample {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
+
+.accordion-content {
+ width: min(720px, 100%);
+ margin: 0 auto;
+ padding: 24px;
+ box-sizing: border-box;
+}
+
+.accordion-toolbar {
+ display: flex;
+ justify-content: flex-end;
+ gap: 8px;
+ margin-bottom: 12px;
+}
+
+.action-button {
+ min-width: 96px;
+}
+
+.accordion-sample igc-accordion {
+ display: block;
+ border: 1px solid var(--ig-gray-300);
+ border-radius: 4px;
+}
diff --git a/samples/layouts/accordion/programmatic-expansion/src/index.tsx b/samples/layouts/accordion/programmatic-expansion/src/index.tsx
new file mode 100644
index 0000000000..a33174d2d2
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/src/index.tsx
@@ -0,0 +1,64 @@
+import React, { useRef } from "react";
+import ReactDOM from "react-dom/client";
+import "./index.css";
+import { IgrAccordion, IgrButton, IgrExpansionPanel } from "igniteui-react";
+import "igniteui-webcomponents/themes/light/bootstrap.css";
+
+export default function AccordionProgrammaticExpansion() {
+ const accordionRef = useRef(null);
+
+ return (
+
+
+
+ accordionRef.current?.showAll()}
+ >
+ Show All
+
+ accordionRef.current?.hideAll()}
+ >
+ Hide All
+
+
+
+
+
+ Billing
+ Invoices and payment settings
+
+ Review invoices, update payment methods, and manage billing
+ contacts.
+
+
+
+
+ Security
+ Password and access controls
+
+ Configure password rules, multi-factor authentication, and
+ recovery options.
+
+
+
+
+ Notifications
+ Product updates and account alerts
+
+ Choose which product updates and account alerts are sent to your
+ team.
+
+
+
+
+
+ );
+}
+
+const root = ReactDOM.createRoot(document.getElementById("root"));
+root.render( );
diff --git a/samples/layouts/accordion/programmatic-expansion/tsconfig.json b/samples/layouts/accordion/programmatic-expansion/tsconfig.json
new file mode 100644
index 0000000000..8c0d146f95
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react-jsx",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/layouts/accordion/programmatic-expansion/vite.config.js b/samples/layouts/accordion/programmatic-expansion/vite.config.js
new file mode 100644
index 0000000000..4fc593892f
--- /dev/null
+++ b/samples/layouts/accordion/programmatic-expansion/vite.config.js
@@ -0,0 +1,12 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ plugins: [react()],
+ build: {
+ outDir: 'build'
+ },
+ server: {
+ open: false
+ },
+});
diff --git a/samples/layouts/accordion/styling/.devcontainer/devcontainer.json b/samples/layouts/accordion/styling/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..5779654722
--- /dev/null
+++ b/samples/layouts/accordion/styling/.devcontainer/devcontainer.json
@@ -0,0 +1 @@
+{"image":"mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"}
diff --git a/samples/layouts/accordion/styling/README.md b/samples/layouts/accordion/styling/README.md
new file mode 100644
index 0000000000..abd2d2cb78
--- /dev/null
+++ b/samples/layouts/accordion/styling/README.md
@@ -0,0 +1,56 @@
+
+
+
+This folder contains implementation of React application with example of Styling feature using [Accordion](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Branches
+
+> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
+
+## Instructions
+
+Follow these instructions to run this example:
+
+
+```
+git clone https://github.com/IgniteUI/igniteui-react-examples.git
+git checkout master
+cd ./igniteui-react-examples
+cd ./samples/layouts/accordion/styling
+```
+
+open above folder in VS Code or type:
+```
+code .
+```
+
+In terminal window, run:
+```
+npm install --legacy-peer-deps
+npm run-script start
+```
+
+Then open http://localhost:4200/ in your browser
+
+
+## Learn More
+
+To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
diff --git a/samples/layouts/accordion/styling/index.html b/samples/layouts/accordion/styling/index.html
new file mode 100644
index 0000000000..a658e62846
--- /dev/null
+++ b/samples/layouts/accordion/styling/index.html
@@ -0,0 +1,11 @@
+
+
+
+ Accordion Styling
+
+
+
+
+
+
+
diff --git a/samples/layouts/accordion/styling/package.json b/samples/layouts/accordion/styling/package.json
new file mode 100644
index 0000000000..ebf67487ca
--- /dev/null
+++ b/samples/layouts/accordion/styling/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "react-accordion-styling",
+ "description": "This project provides example of Accordion Styling using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/layouts/accordion/styling/sandbox.config.json b/samples/layouts/accordion/styling/sandbox.config.json
new file mode 100644
index 0000000000..f8b5562bd6
--- /dev/null
+++ b/samples/layouts/accordion/styling/sandbox.config.json
@@ -0,0 +1,5 @@
+{
+ "infiniteLoopProtection": false,
+ "hardReloadOnChange": false,
+ "view": "browser"
+}
diff --git a/samples/layouts/accordion/styling/src/index.css b/samples/layouts/accordion/styling/src/index.css
new file mode 100644
index 0000000000..543269784c
--- /dev/null
+++ b/samples/layouts/accordion/styling/src/index.css
@@ -0,0 +1,50 @@
+.accordion-sample {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
+
+.accordion-content {
+ width: min(720px, 100%);
+ margin: 0 auto;
+ padding: 24px;
+ box-sizing: border-box;
+}
+
+.accordion-sample igc-accordion {
+ display: block;
+ border: 1px solid var(--ig-gray-300);
+ border-radius: 4px;
+}
+
+.accordion-sample igc-expansion-panel {
+ background-color: var(--ig-gray-50);
+ color: var(--ig-gray-900);
+ border-radius: 4px;
+}
+
+.accordion-sample igc-expansion-panel::part(header) {
+ background-color: var(--ig-gray-100);
+}
+
+.accordion-sample igc-expansion-panel[open]::part(header) {
+ background-color: var(--ig-primary-50);
+}
+
+.accordion-sample igc-expansion-panel::part(indicator) {
+ color: var(--ig-primary-500);
+}
+
+.accordion-sample igc-expansion-panel::part(title) {
+ color: var(--ig-gray-900);
+ font-weight: 600;
+}
+
+.accordion-sample igc-expansion-panel[open]::part(title),
+.accordion-sample igc-expansion-panel[open]::part(subtitle) {
+ color: var(--ig-primary-700);
+}
+
+.accordion-sample igc-expansion-panel::part(content) {
+ color: var(--ig-gray-700);
+}
diff --git a/samples/layouts/accordion/styling/src/index.tsx b/samples/layouts/accordion/styling/src/index.tsx
new file mode 100644
index 0000000000..420d3786ce
--- /dev/null
+++ b/samples/layouts/accordion/styling/src/index.tsx
@@ -0,0 +1,45 @@
+import React from "react";
+import ReactDOM from "react-dom/client";
+import "./index.css";
+import { IgrAccordion, IgrExpansionPanel } from "igniteui-react";
+import "igniteui-webcomponents/themes/light/bootstrap.css";
+
+export default function AccordionStyling() {
+ return (
+
+
+
+
+ Getting Started
+ Setup and onboarding
+
+ Find installation steps, project setup guidance, and resources for
+ building your first application.
+
+
+
+
+ Billing
+ Invoices and payment methods
+
+ Review invoices, update payment methods, and manage billing
+ contacts for your account.
+
+
+
+
+ Security
+ Access and authentication
+
+ Configure password rules, multi-factor authentication, and
+ recovery options for your team.
+
+
+
+
+
+ );
+}
+
+const root = ReactDOM.createRoot(document.getElementById("root"));
+root.render( );
diff --git a/samples/layouts/accordion/styling/tsconfig.json b/samples/layouts/accordion/styling/tsconfig.json
new file mode 100644
index 0000000000..8c0d146f95
--- /dev/null
+++ b/samples/layouts/accordion/styling/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react-jsx",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/layouts/accordion/styling/vite.config.js b/samples/layouts/accordion/styling/vite.config.js
new file mode 100644
index 0000000000..4fc593892f
--- /dev/null
+++ b/samples/layouts/accordion/styling/vite.config.js
@@ -0,0 +1,12 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ plugins: [react()],
+ build: {
+ outDir: 'build'
+ },
+ server: {
+ open: false
+ },
+});
diff --git a/samples/layouts/accordion/tailwind-styling/.devcontainer/devcontainer.json b/samples/layouts/accordion/tailwind-styling/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..5779654722
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/.devcontainer/devcontainer.json
@@ -0,0 +1 @@
+{"image":"mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"}
diff --git a/samples/layouts/accordion/tailwind-styling/README.md b/samples/layouts/accordion/tailwind-styling/README.md
new file mode 100644
index 0000000000..e5af6a5a19
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/README.md
@@ -0,0 +1,56 @@
+
+
+
+This folder contains implementation of React application with example of Tailwind Styling feature using [Accordion](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Branches
+
+> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
+
+## Instructions
+
+Follow these instructions to run this example:
+
+
+```
+git clone https://github.com/IgniteUI/igniteui-react-examples.git
+git checkout master
+cd ./igniteui-react-examples
+cd ./samples/layouts/accordion/tailwind-styling
+```
+
+open above folder in VS Code or type:
+```
+code .
+```
+
+In terminal window, run:
+```
+npm install --legacy-peer-deps
+npm run-script start
+```
+
+Then open http://localhost:4200/ in your browser
+
+
+## Learn More
+
+To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
diff --git a/samples/layouts/accordion/tailwind-styling/index.html b/samples/layouts/accordion/tailwind-styling/index.html
new file mode 100644
index 0000000000..d21cb0e1c3
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/index.html
@@ -0,0 +1,11 @@
+
+
+
+ Accordion Tailwind Styling
+
+
+
+
+
+
+
diff --git a/samples/layouts/accordion/tailwind-styling/package.json b/samples/layouts/accordion/tailwind-styling/package.json
new file mode 100644
index 0000000000..24d204ed97
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "react-accordion-tailwind-styling",
+ "description": "This project provides example of Accordion Tailwind Styling using Infragistics React components",
+ "author": "Infragistics",
+ "homepage": ".",
+ "version": "1.4.0",
+ "private": true,
+ "scripts": {
+ "start": "vite --port 4200",
+ "build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
+ "preview": "vite preview",
+ "test": "vitest"
+ },
+ "dependencies": {
+ "igniteui-dockmanager": "^1.17.0",
+ "igniteui-react": "19.7.0",
+ "igniteui-react-core": "19.6.0",
+ "igniteui-webcomponents": "^7.2.1",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",
+ "tslib": "^2.4.0"
+ },
+ "devDependencies": {
+ "@tailwindcss/vite": "^4.3.3",
+ "@types/jest": "^29.2.0",
+ "@types/node": "^24.7.1",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
+ "@vitejs/plugin-react": "^5.0.4",
+ "@vitest/browser": "^3.2.4",
+ "tailwindcss": "^4.3.3",
+ "typescript": "^4.8.4",
+ "vite": "^7.1.9",
+ "vitest": "^3.2.4",
+ "vitest-canvas-mock": "^0.3.3",
+ "worker-loader": "^3.0.8"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ]
+}
diff --git a/samples/layouts/accordion/tailwind-styling/sandbox.config.json b/samples/layouts/accordion/tailwind-styling/sandbox.config.json
new file mode 100644
index 0000000000..f8b5562bd6
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/sandbox.config.json
@@ -0,0 +1,5 @@
+{
+ "infiniteLoopProtection": false,
+ "hardReloadOnChange": false,
+ "view": "browser"
+}
diff --git a/samples/layouts/accordion/tailwind-styling/src/index.css b/samples/layouts/accordion/tailwind-styling/src/index.css
new file mode 100644
index 0000000000..d5519b6763
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/src/index.css
@@ -0,0 +1,9 @@
+@import "tailwindcss/theme.css" layer(theme);
+@import "tailwindcss/utilities.css" layer(utilities);
+@source "./index.tsx";
+
+.accordion-tailwind-sample {
+ width: 100%;
+ height: 100%;
+ overflow-y: auto;
+}
diff --git a/samples/layouts/accordion/tailwind-styling/src/index.tsx b/samples/layouts/accordion/tailwind-styling/src/index.tsx
new file mode 100644
index 0000000000..4067390c92
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/src/index.tsx
@@ -0,0 +1,59 @@
+import React from "react";
+import ReactDOM from "react-dom/client";
+import "./index.css";
+import { IgrAccordion, IgrExpansionPanel } from "igniteui-react";
+import "igniteui-webcomponents/themes/light/bootstrap.css";
+
+const panelClassName = [
+ "rounded",
+ "bg-[var(--ig-gray-50)]",
+ "text-[var(--ig-gray-900)]",
+ "[&::part(header)]:bg-[var(--ig-gray-100)]",
+ "[&[open]::part(header)]:bg-[var(--ig-primary-50)]",
+ "[&::part(indicator)]:text-[var(--ig-primary-500)]",
+ "[&::part(title)]:font-semibold",
+ "[&::part(title)]:text-[var(--ig-gray-900)]",
+ "[&[open]::part(title)]:text-[var(--ig-primary-700)]",
+ "[&[open]::part(subtitle)]:text-[var(--ig-primary-700)]",
+ "[&::part(content)]:text-[var(--ig-gray-700)]",
+].join(" ");
+
+export default function AccordionTailwindStyling() {
+ return (
+
+
+
+
+ Getting Started
+ Setup and onboarding
+
+ Find installation steps, project setup guidance, and resources for
+ building your first application.
+
+
+
+
+ Billing
+ Invoices and payment methods
+
+ Review invoices, update payment methods, and manage billing
+ contacts for your account.
+
+
+
+
+ Security
+ Access and authentication
+
+ Configure password rules, multi-factor authentication, and
+ recovery options for your team.
+
+
+
+
+
+ );
+}
+
+const root = ReactDOM.createRoot(document.getElementById("root"));
+root.render( );
diff --git a/samples/layouts/accordion/tailwind-styling/tsconfig.json b/samples/layouts/accordion/tailwind-styling/tsconfig.json
new file mode 100644
index 0000000000..8c0d146f95
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/tsconfig.json
@@ -0,0 +1,44 @@
+{
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "baseUrl": ".",
+ "outDir": "build/dist",
+ "module": "esnext",
+ "target": "es5",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "sourceMap": true,
+ "allowJs": true,
+ "jsx": "react-jsx",
+ "moduleResolution": "node",
+ "rootDir": "src",
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noImplicitAny": true,
+ "noUnusedLocals": false,
+ "importHelpers": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "isolatedModules": true,
+ "noEmit": true
+ },
+ "exclude": [
+ "node_modules",
+ "build",
+ "scripts",
+ "acceptance-tests",
+ "webpack",
+ "jest",
+ "src/setupTests.ts",
+ "**/odatajs-4.0.0.js",
+ "config-overrides.js"
+ ],
+ "include": [
+ "src"
+ ]
+}
diff --git a/samples/layouts/accordion/tailwind-styling/vite.config.js b/samples/layouts/accordion/tailwind-styling/vite.config.js
new file mode 100644
index 0000000000..c1fff0c83c
--- /dev/null
+++ b/samples/layouts/accordion/tailwind-styling/vite.config.js
@@ -0,0 +1,13 @@
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import tailwindcss from '@tailwindcss/vite';
+
+export default defineConfig({
+ plugins: [react(), tailwindcss()],
+ build: {
+ outDir: 'build'
+ },
+ server: {
+ open: false
+ },
+});
diff --git a/samples/layouts/avatar/overview/src/index.css b/samples/layouts/avatar/overview/src/index.css
index 9407c4b19a..8c31e65714 100644
--- a/samples/layouts/avatar/overview/src/index.css
+++ b/samples/layouts/avatar/overview/src/index.css
@@ -30,11 +30,14 @@
}
.avatar-stack igc-avatar + igc-avatar {
- margin-inline-start: -1.5rem;
+ /* Proportional to the avatar's own rendered size (--size, set internally
+ by the theme) rather than a fixed length, since themes disagree widely
+ on how big a "large" avatar actually is. */
+ margin-inline-start: calc(var(--size) * -0.27);
}
.avatar-stack igc-avatar::part(base) {
- box-shadow: 0 0 0 0.375rem var(--ig-surface-500);
+ box-shadow: 0 0 0 calc(var(--size) * 0.07) var(--ig-surface-500);
}
.avatar-stack igc-avatar:last-child {