# Disabled Context

> Use when a component has a `disabled` state/variant, or when building a compound component that owns a disabled state — inherit/provide it via the shared disabled context so state flows from parent to sub-components.

- Skill: `ledgerhq/disabled-context` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ledgerhq/disabled-context`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ledgerhq/disabled-context/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: ledgerhq (https://skillmd.com/u/ledgerhq)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ledgerhq/disabled-context

---


# Shared disabled context

Source of truth: `libs/utils-shared/src/lib/context/disabledContext.tsx`

- **Consumers**: Any component with a `disabled` state/variant must use the shared disabled context so it inherits disabled state from parent components. Follow existing consumers (e.g. `BaseButton`, `Switch`) for the pattern.
- **Providers**: Compound components that own a disabled state must provide it via the shared disabled context so sub-components inherit it automatically. If the compound component already has its own context provider, add disabled to that context instead of nesting a separate provider.

