Skip to content

lit-ui-router / UiSrefActiveDirective

Class: UiSrefActiveDirective

Defined in: packages/lit-ui-router/src/ui-sref-active.ts:182

Directive class that adds CSS classes based on active state.

This directive is used internally by the uiSrefActive directive function. It watches the current router state and applies CSS classes to elements when their associated states are active.

The directive can operate in two modes:

  1. Explicit state: Provide a state name to watch
  2. Container mode: Automatically watch nested uiSref directives

See

Extends

Properties

PropertyTypeDefault valueDefined in
activeboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:204
activeClassesstring[][]packages/lit-ui-router/src/ui-sref-active.ts:197
elementElement | nullnullpackages/lit-ui-router/src/ui-sref-active.ts:183
enteringboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:206
exactboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:205
exactClassesstring[][]packages/lit-ui-router/src/ui-sref-active.ts:198
exitingboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:207
optionsTransitionOptions{}packages/lit-ui-router/src/ui-sref-active.ts:202
paramsRawParams{}packages/lit-ui-router/src/ui-sref-active.ts:201
parentViewUiView | nullnullpackages/lit-ui-router/src/ui-sref-active.ts:191
statestring | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:200
targetStatesSet<TargetState>undefinedpackages/lit-ui-router/src/ui-sref-active.ts:209
uiRouterUIRouterLit | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:185
uiSrefsWeakMap<TargetState, UiSrefElement>undefinedpackages/lit-ui-router/src/ui-sref-active.ts:210