Skip to main content
← Back to Table of Contents

Summary

A specialized input for distributing 100% across multiple segments. Features interactive sliders, numeric inputs, and “locking” capabilities. Commonly used for A/B test traffic allocation, budget distribution, or weighting algorithms.

Basic usage

Standard 3-way split

Locked segments

Prevent users from changing specific weights while allowing others to rebalance.

State & validation

Stored value

The field stores an array of integers. The component automatically ensures that the sum of all integers is exactly 100.

Automatic normalization

When the component is hydrated or the segment count changes, it automatically rebalances weights to reach 100%. If a state is invalid (e.g. sums to 90%), it will be normalized to an equal split or adjusted based on locked segments.

Advanced Features

Linking to a Repeater

TrafficSplit can dynamically sync its segment count with a Filament Repeater. This is perfect for split-testing URLs or features where the number of variants is dynamic.

Minimum Weight

Ensure no segment falls below a certain percentage (e.g. for statistical significance).

Configuration API

All methods accept Closure unless noted.

Real-world examples

A/B Test Configuration


Playground

/admin/flex-fields-playground/traffic-split See Playground for setup.

CSS classes (reference)