Skip to content

feat(splitter): follow --ig-size with small, medium and large bars - #18017

Merged
simeonoff merged 9 commits into
masterfrom
mpopov/feat-18013-splitter-support-small-medium-and
Nov 25, 2026
Merged

simeonoff merged 9 commits into
masterfrom
mpopov/feat-18013-splitter-support-small-medium-and

Conversation

@desig9stein

@desig9stein desig9stein commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #18013

Description

igx-splitter follows --ig-size. The bar, the drag handle and the expanders have a small, a medium and a large step, and the default is small, which is the size from before.

  • igx-splitter includes sizable() and sets --component-size: var(--ig-size, <default-size>). The schema default is small.
  • The bar is 6px, 12px, 18px thick. It has a thickness of its own now; before it was the 4px handle plus 1px of padding on each side.
  • The drag handle is 4px, 6px, 8px thick. Its radius is the border-radius token, whose default is now 2px, 8px, 8px, scaled by --ig-radius-factor. A --border-radius or --ig-splitter-border-radius that you set is one value and applies at every size, as before.
  • The expanders are 4px, 5px, 6px high and twice that wide, and the hitbox of each is its icon box, see Icon box.
  • The three steps add to the size token, so the documented --size and --ig-splitter-size overrides still set the small size: 10px gives a 12px, 18px, 24px bar and a 10px, 12px, 14px handle. Before, it gave a 12px bar and a 10px handle.
  • In Indigo the idle bar is 1px, 4px, 8px thick by size, as design asked in the review. It is checked in the compiled CSS, not by a spec. The idle scale is tan(atan2(<idle thickness>, <bar thickness>)), the ratio of the two lengths, so it follows the size, a size override and the base font size. The bar hitbox follows the bar thickness.
Small Medium Large
Bar 6px 12px 18px
Drag handle 4px 6px 8px
Drag handle radius 2px 8px 8px
Expander height 4px 5px 6px

What stays the same:

  • A splitter without --ig-size keeps its sizes: 6px bar, 4px handle with a 2px radius, 4px expanders. The one difference is the position of the expanders, 5px further from the handle (3px in Indigo), see Icon box.
  • A splitter with an overridden --size or --ig-splitter-size renders as before at the default size in Material, Fluent and Bootstrap. In Indigo the bar on hover is the same, and two things change: the idle bar is 1px where it was thicker (2px for --ig-splitter-size: 10px), and the bar hitbox is 4 times the bar thickness, 48px for that override where it was a fixed 24px.
  • The expander click areas follow the expander size, so with a 10px size override they grow from 16x12px to 40x30px.
  • Inputs, outputs and component classes. No migration.
  • Every way of setting the handle radius: splitter-theme($border-radius: ...), --border-radius and --ig-splitter-border-radius.
  • The drag handle is 25% of the bar length at every size.

Why the steps are not theme tokens: the bar, handle and expander steps are internal variables that add to the size token (bar +2/8/14px, handle +0/2/4px, expanders +0/1/2px). Separate tokens would let a theme set a handle thicker than its bar. size stays the one token for the thickness: it sets the small size and every step moves with it.

Short bars:

  • The 48px margins around the drag handle shrink when the bar is too short: clamp(0px, 37.5cqw - <expander box>, 48px), with the bar as a size container. The handle keeps 25% of the bar length and the expanders stay inside the bar. A 128px bar has a 32px handle with 30px margins at small and 24px at large.
  • Before, the margins were a fixed 48px, so the handle shrank instead.
  • A bar with room for everything, about 176px or more at small, keeps the 48px margins in every state, also with a collapsed pane. A shorter one has a longer handle and narrower margins, also at the default size. It is in the CHANGELOG under Bug Fixes.
  • container-type: size on .igx-splitter-bar adds layout and size containment to it. The bar has a set thickness and takes its length from the splitter, so its size does not come from its content.

Removed: the internal --splitter-size custom property on igx-splitter, which held the bar thickness as a number for the Indigo scale.

Icon box, asked by design in the review:

  • Each expander takes the icon box of the design along the bar: 18px, 20px, 24px, and 14px, 16px, 24px in Indigo. The triangle is 8px, 10px, 12px long, so it gets a margin of 5px, 5px, 6px on each side (3px, 3px, 6px in Indigo).
  • The hitbox of an expander, its ::before, is that icon box as a square, centered on the triangle: 18px, 20px, 24px, and 14px, 16px, 24px in Indigo. Before, it was 4 by 3 times the triangle size in every theme (16px by 12px at small), which is what design measured as the container. The hitbox test fails without this change. The Indigo sizes follow from the Indigo space and have no spec.
  • The drag handle is 48px from the box: 53px, 53px, 54px from the triangle (51px, 51px, 54px in Indigo). Before, it was 48px from the triangle.
  • This changes the default size too: at small each expander is 5px further from the handle than before, 3px in Indigo. It is in the CHANGELOG.
  • The Indigo values are checked in the compiled CSS, not by a spec.

Known limits:

  • The handoff draws the expanders as arrow icons (18/20/24px, Indigo 14/16/24px). They stay CSS triangles here, 4/5/6px in every theme, so small does not change.
  • The handoff measures the gap as 48/48/46px from the icon box. Here it is 48px from the box at every size when the bar has room.
  • In Indigo, a change of --ig-size at run time animates the idle bar with the 0.3s delay of the bar transition, so the idle bar does not have its new thickness until it ends.

Motivation / Context

The splitter ignored --ig-size while the other components scale between small, medium and large. Design handoff and values are in #18013.

Depends on IgniteUI/igniteui-theming#683 (for IgniteUI/igniteui-theming#682), which adds default-size to the splitter schema and gives border-radius a step for each size. It is released in igniteui-theming@30.3.0. var-get() errors on a key the schema lacks, so the styles do not compile with 30.2.0, and this PR bumps the igniteui-theming range to ^30.3.0 in the root package.json and in the dependencies of projects/igniteui-angular/package.json. The lockfile loses the nested sass-embedded copies under igniteui-theming: 30.3.0 widens its sass-embedded range, so they dedupe to the root one. With 30.3.0 installed from the registry, lint:lib, build:lib, test:styles (40 tests), test:schematics (790 tests) and the 50 splitter tests pass.

Related: IgniteUI/igniteui-webcomponents#2634.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

Splitter, Theming

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

splitter.component.spec.ts, IgxSplitter sizing, 7 tests, kept to the ones that guard behavior. The library tests load no global theme, so the test host declares the splitter tokens with the values of the schema.

  • should render the small size without --ig-size.
  • should size the bar, the handle and the expanders at medium and large.
  • should add each step to an overridden --ig-splitter-size.
  • should keep 48px between the handle and the icon box of each expander at every size.
  • should keep the 48px margins around the handle with a collapsed pane.
  • should keep the handle at 25% of a short bar and narrow the gaps at every size.
  • should size the hitbox of each expander to the icon box and center it on the triangle. Both orientations, every size.

Against the styles of master, 4 of the 5 fail; the collapsed-pane test passes there too. The small-size test fails there only on the handle radius: the test host declares the sized border-radius token, and master sets no size flags on igx-splitter, so it resolves to 8px, which renders as the same pill on a 4px handle.

npx ng test igniteui-angular --watch=false --include='**/splitter*.spec.ts': 51 tests pass, after npm run build:styles:components.

The compiled library theme (themes/presets/igniteui-angular.scss) emits --size, --default-size and a sized --border-radius on igx-splitter.

npm run lint:lib, npm run build:lib, npm run test:styles and npm run test:schematics pass. The full test:lib suite and a manual check in the demo app were not run.

Test Configuration:

  • Angular version: the version on master
  • Browser(s): Chromium (headless)
  • OS: macOS

Screenshots / Recordings

None.

Checklist:

  • All relevant labels have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

- The bar is 6px, 12px or 18px thick, the drag handle 4px, 6px or 8px
  and the expanders 4px, 5px or 6px high. The default size is small, so
  a splitter without `--ig-size` renders as before.
- The steps are internal: the styles add them to the `size` token, so
  the handle can't be set thicker than the bar, and `--size` and
  `--ig-splitter-size` still set the small size.
- The drag handle radius is the `border-radius` token, whose default is
  2px, 8px, 8px by size. A value that you set applies at every size.
- The Indigo idle bar stays 1px thick at every size.
- The 48px margins around the drag handle shrink when the bar is too
  short, so the handle keeps 25% of the bar length and the expanders
  stay inside the bar.
- The internal `--splitter-size` custom property is removed.

Needs the igniteui-theming release with IgniteUI/igniteui-theming#683.

Closes #18013.
@desig9stein
desig9stein force-pushed the mpopov/feat-18013-splitter-support-small-medium-and branch from 57d4e8f to d9b64eb Compare November 19, 2026 14:55
@desig9stein
desig9stein marked this pull request as ready for review November 19, 2026 15:14
Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new default-size lookup breaks Sass compilation with the currently locked and permitted theming version, requiring a compatible theming release and updates to both manifests and the lockfile.

1 open issue
What changed in this PR

Adds --ig-size support to the Angular splitter, introducing small, medium, and large sizes while keeping small as the default.

Changes:

  • Scales bars, handles, expanders, and hitboxes, while preserving Indigo’s 1px idle bar.
  • Adjusts handle spacing on short bars and adds sizing regression tests.
  • Documents sizing behavior, overrides, and layout changes.
File Description
projects/​igniteui-angular/​splitter/​src/​splitter/​themes/​shared/​indigo.scss Adapts idle scaling and hitboxes to bar thickness.
projects/​igniteui-angular/​splitter/​src/​splitter/​themes/​_base.scss Adds size steps and responsive short-bar spacing.
projects/​igniteui-angular/​splitter/​src/​splitter/​splitter.component.spec.ts Tests sizing, overrides, and handle spacing.
projects/​igniteui-angular/​splitter/​README.md Documents size selection and token overrides.
CHANGELOG.md Records sizing support and the short-bar layout fix.

Review effort: Balanced

@sbayreva

Copy link
Copy Markdown

Indigo

For Indigo in Idle state the height of the bar should be:

Small: 1px
Medium: 4px
Large: 8px

Relevant for all themes

There is a small container around the arrow (expander) which follows the size of the icon (since in figma we are using icons). The margins start not from the end of this small container but from the arrow itself. Is it possible to start from the container? If so, keep in mind that in Indigo the size of the icon is a bit different ( S: 14px; M: 16px; L: 24px )

Screenshot 2026-11-20 at 17 05 01 Screenshot 2026-11-20 at 17 05 32

- The idle Indigo bar is 1px, 4px or 8px thick at small, medium and large. Before, it was 1px at every size.

Refs #18013.
- Each expander takes the 18px, 20px and 24px icon box of the design
  along the bar, 14px, 16px and 24px in the Indigo theme.
- The drag handle is 48px from the box, so the triangle is 5px further
  away at small.

Refs #18013.
@desig9stein

Copy link
Copy Markdown
Contributor Author

Both are in, here and in IgniteUI/igniteui-webcomponents#2635.

Indigo idle bar: 1px, 4px and 8px at small, medium and large. On hover and focus it takes the full thickness of the size, as before.

Margins from the container: the 48px now starts from the icon container, 18px, 20px and 24px, and 14px, 16px and 24px in Indigo. The arrows stay CSS triangles (8px, 10px and 12px long), so the triangle itself is 5px, 5px and 6px further from the handle, and 3px, 3px and 6px in Indigo.

@sbayreva

Copy link
Copy Markdown

The small container around the expander in Indigo still follows the size of the rest of the themes. The size of the small container of the expander in Indigo theme should be:

Small: 14px
Medium: 16px
Large: 24px

…chema

- The splitter styles read `default-size` and the sized `border-radius` from the schema, which `igniteui-theming` ships from 30.3.0.
- The `igniteui-angular` package depends on `^30.3.0`, so a consumer gets a schema the styles compile with.
- The nested `sass-embedded` copies under `igniteui-theming` dedupe to the root one.
- The area of an expander that takes the pointer is the icon box of the design, centered on the arrow: 18px, 20px or 24px square, 14px, 16px or 24px in the Indigo theme.
- Before, it was 4 by 3 times the arrow size in every theme: 16px by 12px at small.

Closes #18013.

@simeonoff simeonoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this matches IgniteUI/igniteui-webcomponents#2635 and the igniteui-theming@30.3.0 schema: the size steps, the Indigo idle bar, the icon box, the hitboxes and the short-bar clamp() all line up. Two small things:

1. CHANGELOG: list the behaviour changes under ### General
The entry is under New Functionality, but it includes changes that apps get without opting in:

  • an app that already sets --ig-size to medium or large gets a thicker bar;
  • at the default size, the expanders are 5px further from the handle (3px in Indigo) and the expander click area changes from 16×12px to the icon box;
  • in Indigo, the idle bar is thinner with an overridden --ig-splitter-size.

A short line under ### General would make these easier to spot.

2. Indigo: changing --ig-size at run time
The idle bar reaches its new thickness only after the bar transition's 0.3s delay (transition: all 0.25s 0.3s in shared/indigo.scss). A run-time size change is rare, so I'm fine leaving it, but please add it to the Known limits so it doesn't get lost. The web components PR lists the same limit.

- CHANGELOG: the thicker bar for an app that already sets `--ig-size`, the new expander gap and click area, and the thinner Indigo idle bar with an overridden size are under General; New Functionality keeps the new sizes.
@desig9stein

Copy link
Copy Markdown
Contributor Author

Thanks, both done in d0eb77f.

  1. CHANGELOG: 22.3.1 has a ### General entry for the splitter with the three changes apps get without opting in: the thicker bar for an app that already sets --ig-size to medium or large, the expander gap and click area, and the thinner Indigo idle bar with an overridden --ig-splitter-size. New Functionality keeps the new sizes.
  2. Known limits in the description lists the 0.3s delay before the Indigo idle bar takes a run-time --ig-size change.

@simeonoff simeonoff added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Nov 25, 2026
@simeonoff
simeonoff merged commit 8de605a into master Nov 25, 2026
7 checks passed
@simeonoff
simeonoff deleted the mpopov/feat-18013-splitter-support-small-medium-and branch November 25, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Splitter: support small, medium and large sizes through --ig-size

5 participants