Skip to content

lit-ui-router / UiSrefActiveDirective

Class: UiSrefActiveDirective

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

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:205
activeClassesstring[][]packages/lit-ui-router/src/ui-sref-active.ts:198
elementElement | nullnullpackages/lit-ui-router/src/ui-sref-active.ts:184
enteringboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:207
exactboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:206
exactClassesstring[][]packages/lit-ui-router/src/ui-sref-active.ts:199
exitingboolean | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:208
optionsTransitionOptions{}packages/lit-ui-router/src/ui-sref-active.ts:203
paramsRawParams{}packages/lit-ui-router/src/ui-sref-active.ts:202
parentViewUiView | nullnullpackages/lit-ui-router/src/ui-sref-active.ts:192
statestring | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:201
targetStatesSet<TargetState>undefinedpackages/lit-ui-router/src/ui-sref-active.ts:210
uiRouterUIRouterLit | undefinedundefinedpackages/lit-ui-router/src/ui-sref-active.ts:186
uiSrefsWeakMap<TargetState, UiSrefElement>undefinedpackages/lit-ui-router/src/ui-sref-active.ts:211