Skip to content

lit-ui-router / UiSrefActiveDirective

Class: UiSrefActiveDirective

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

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 valueDescriptionDefined in
activeboolean | undefinedundefined-packages/lit-ui-router/src/ui-sref-active.ts:308
activeClassesstring[][]-packages/lit-ui-router/src/ui-sref-active.ts:284
ariaCurrentValue| false | AriaCurrentValue | AriaCurrentValues | undefinedundefinedundefined = default (on for link elements)packages/lit-ui-router/src/ui-sref-active.ts:287
elementElement | nullnull-packages/lit-ui-router/src/ui-sref-active.ts:270
enteringboolean | undefinedundefined-packages/lit-ui-router/src/ui-sref-active.ts:310
exactboolean | undefinedundefined-packages/lit-ui-router/src/ui-sref-active.ts:309
exactClassesstring[][]-packages/lit-ui-router/src/ui-sref-active.ts:285
exitingboolean | undefinedundefined-packages/lit-ui-router/src/ui-sref-active.ts:311
optionsTransitionOptions{}-packages/lit-ui-router/src/ui-sref-active.ts:306
paramsRawParams{}-packages/lit-ui-router/src/ui-sref-active.ts:305
parentViewUiView | nullnull-packages/lit-ui-router/src/ui-sref-active.ts:278
statestring | undefinedundefined-packages/lit-ui-router/src/ui-sref-active.ts:304
targetStatesSet<TargetState>undefined-packages/lit-ui-router/src/ui-sref-active.ts:313
uiRouterUIRouterLit | undefinedundefined-packages/lit-ui-router/src/ui-sref-active.ts:272
uiSrefsWeakMap<TargetState, UiSrefElement>undefined-packages/lit-ui-router/src/ui-sref-active.ts:314