This repository was archived by the owner on Mar 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Mar 25, 2026. It is now read-only.
v2.0: Make all components truly headless (remove ALL default styles) #97
Copy link
Copy link
Closed
Labels
area: componentsRelated to the React componentsRelated to the React componentsenhancementNew feature or requestNew feature or requestpriority: criticalMust fix ASAP, blocking usageMust fix ASAP, blocking usagestatus: needs-triageNew issue awaiting evaluationNew issue awaiting evaluation
Description
Summary
All components in this library should be truly headless with ZERO default styles. Currently, several components ship with CSS, violating the headless architecture principle.
Problem
- Components have hardcoded styles that users cannot easily override
- Dark mode support is inconsistent (some use media queries, some use classes)
- Users must use
\!importantto override default styles - Bundle size is increased unnecessarily with CSS that many users won't want
Components That Need CSS Removed
1. QuickFilterDropdown
- File to delete:
src/components/QuickFilterDropdown/QuickFilterDropdown.module.css(643 lines!) - Changes needed: Remove all
stylesimports and className applications
2. DateFilter/RelativeDateFilter
- Styles to remove from:
src/index.css.ag-grid-date-filter .toggle-button.ag-grid-date-filter .toggle-button.active.ag-grid-date-filter .toggle-button.inactive.ag-grid-date-filter .relative-date-input.ag-grid-date-filter .resolved-date.ag-grid-date-filter .input-wrapper.ag-grid-date-filter .filter-buttons.ag-grid-date-filter .filter-button.ag-grid-date-filter .apply-button.ag-grid-date-filter .reset-button.ag-grid-date-filter .error-message
3. Any other components with CSS
- Audit ALL components for any CSS imports or style applications
Proposed API Changes
Option 1: className props for each element
<QuickFilterDropdown
classNames={{
container: 'my-container',
trigger: 'my-trigger-button',
dropdown: 'my-dropdown-panel',
option: 'my-option',
// etc...
}}
/>Option 2: Render props for full control
<QuickFilterDropdown
renderTrigger={({ isOpen, selectedOption }) => (
<button className="my-custom-button">
{selectedOption?.label || 'Select...'}
</button>
)}
renderOption={({ option, isSelected, isHighlighted }) => (
<div className={cn('my-option', { selected: isSelected })}>
{option.label}
</div>
)}
/>Option 3: Unstyled primitives
// Export unstyled building blocks
import {
FilterDropdown,
FilterTrigger,
FilterOption
} from 'ag-grid-react-components/primitives'Migration Guide Required
- Document how to migrate from v1 to v2
- Provide example styles that match current defaults
- Show Tailwind, CSS modules, and styled-components examples
Benefits
- True headless architecture
- Smaller bundle size (no CSS)
- Full styling control for users
- Consistent with modern headless libraries (Headless UI, Radix, etc.)
- No more CSS specificity battles
Breaking Change
This is a MAJOR breaking change and requires v2.0.0 release.
Implementation Plan
- Remove all CSS files and imports
- Update components to accept className/classNames props
- Move all current styles to demo as examples
- Update documentation with styling examples
- Create migration guide
- Update CLAUDE.md with strict "NO CSS" policy
Related Issues
- QuickFilterDropdown violates headless architecture with hardcoded styles #96 - QuickFilterDropdown violates headless architecture
- fix: remove global button hover rule causing white backgrounds in dark theme #95 - Hover states showing white in dark theme (band-aid fix)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: componentsRelated to the React componentsRelated to the React componentsenhancementNew feature or requestNew feature or requestpriority: criticalMust fix ASAP, blocking usageMust fix ASAP, blocking usagestatus: needs-triageNew issue awaiting evaluationNew issue awaiting evaluation
Projects
Status
✅ Done