{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "spreadsheet-editor-conditional-formatting",
  "framework": "react",
  "type": "registry:component",
  "component": "SpreadsheetEditor",
  "variant": "conditional-formatting",
  "dependencies": [
    "@syncfusion/ej2-react-spreadsheet"
  ],
  "description": "Spreadsheet editor with conditional formatting rules applied to data ranges.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": true,
    "platformIndex": "https://ai.syncfusion.com/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/ts/spreadsheet-editor-conditional-formatting.md"
  },
  "files": [
    {
      "target": "src/components/spreadsheet-editor-conditional-formatting/SpreadSheetEditor.tsx",
      "content": "import React from 'react';\nimport { SpreadsheetComponent, SheetsDirective, SheetDirective, ColumnsDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { ColumnDirective, RowDirective, RowsDirective, CellsDirective, CellDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { ConditionalFormatsDirective, ConditionalFormatDirective, RangeDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { RangesDirective } from '@syncfusion/ej2-react-spreadsheet';\nimport { conditionalFormatting } from '../datasource/spreadsheet-editor.data';\n\n/**\n * ConditionalFormatting sample\n */\n\nfunction ConditionalFormatting(): React.ReactElement {\n    let spreadsheet: SpreadsheetComponent;\n    function onCreated(): void {\n        spreadsheet.merge('A1:H1');\n        spreadsheet.cellFormat({ fontWeight: 'bold', textAlign: 'center' }, 'A2:H2');\n        spreadsheet.cellFormat({ fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle', fontSize: '13pt' }, 'A1:H1');\n        // Apply format to the specified range in the active sheet.\n        spreadsheet.numberFormat('$#,##0.00', 'D3:D18');\n        spreadsheet.numberFormat('$#,##0.00', 'E3:E18');\n        spreadsheet.numberFormat('$#,##0.00', 'F3:F18');\n        spreadsheet.numberFormat('m/d/yyyy', 'G3:G18');\n        spreadsheet.conditionalFormat({ type: 'BlueDataBar', range: 'D3:D18' });\n        spreadsheet.conditionalFormat({ type: 'GreenDataBar', range: 'E3:E18' });\n        spreadsheet.conditionalFormat({ type: 'ThreeStars', range: 'H3:H18' });\n        spreadsheet.conditionalFormat({ type: 'Top10Items', value: '1', format: { style: { color: '#ffffff', backgroundColor: '#009999', fontWeight: 'bold' } }, range: 'F3:F18' });\n        spreadsheet.conditionalFormat({ type: 'Bottom10Items', value: '1', format: { style: { color: '#ffffff', backgroundColor: '#c68d53', fontWeight: 'bold' } }, range: 'F3:F18' });\n    }\n\n    return (\n        <div className='control-pane'>\n            <div className='control-section spreadsheet-control'>\n                <SpreadsheetComponent openUrl='https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/open'\n                    saveUrl='https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/save'\n                    ref={(ssObj: SpreadsheetComponent | null) => { if (ssObj) spreadsheet = ssObj }} created={onCreated}>\n                    <SheetsDirective>\n                        <SheetDirective name='Inventory List'>\n                            <RowsDirective>\n                                <RowDirective height={30}>\n                                    <CellsDirective>\n                                        <CellDirective index={1} value='Inventory List'></CellDirective>\n                                    </CellsDirective>\n                                </RowDirective>\n                            </RowsDirective>\n                            <RangesDirective>\n                                <RangeDirective dataSource={conditionalFormatting} startCell='A2' ></RangeDirective>\n                            </RangesDirective>\n                            <ConditionalFormatsDirective>\n                                <ConditionalFormatDirective type='GYRColorScale' range='C3:C18'></ConditionalFormatDirective>\n                                <ConditionalFormatDirective type='LessThan' cFColor='RedFT' value='8-8-2019' range='G3:G18'>\n                                </ConditionalFormatDirective>\n                            </ConditionalFormatsDirective>\n                            <ColumnsDirective>\n                                <ColumnDirective width={100}></ColumnDirective>\n                                <ColumnDirective width={158}></ColumnDirective>\n                                <ColumnDirective width={72}></ColumnDirective>\n                                <ColumnDirective width={113}></ColumnDirective>\n                                <ColumnDirective width={113}></ColumnDirective>\n                                <ColumnDirective width={77}></ColumnDirective>\n                                <ColumnDirective width={97}></ColumnDirective>\n                                <ColumnDirective width={73}></ColumnDirective>\n                            </ColumnsDirective>\n                        </SheetDirective>\n                    </SheetsDirective>\n                </SpreadsheetComponent>\n            </div>\n        </div>\n    )\n}\nexport default ConditionalFormatting;"
    }
  ]
}