Releasing Changes
Design system changes are broad and can affect many product surfaces at once. To validate design and interaction changes, it helps to have some structure around releases.
Rollout checklist
Section titled “Rollout checklist”Feature flags
Section titled “Feature flags”For high-risk or broadly impactful changes, wrap the new behavior behind a LaunchDarkly feature flag. This allows the change to be tested in production with a subset of users before full rollout.
Stylus components can read flags directly using the useFlags hook from the LaunchDarkly React SDK:
import { useFlags } from "launchdarkly-react-client-sdk";
export const Card = (props: CardProps) => { const flags = useFlags(); const useNewLayout = flags["stylus-card-v2"] ?? false;
if (useNewLayout) { return <NewCardLayout {...props} />; }
return <CurrentCardLayout {...props} />;};useFlags returns all feature flag values from the nearest LDProvider. Components using this hook must render inside an LDProvider.
When the rollout is complete, remove the flag check and the old code path.