range

A styled native range input with browser-owned interaction and AngularTS model binding.

Use a native range input directly. AngularCSS adds presentation but registers no directive.

<label for="volume">Volume</label>
<input id="volume" type="range" min="0" max="100" ng-model="volume" />
<output for="volume">{{ volume }}</output>

Example

View source
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>AngularCSS Range</title>
    <link rel="stylesheet" href="../../css/preflight.css" />
    <link rel="stylesheet" href="../../css/angular.css" />
    <link rel="stylesheet" href="../example.css" />
    <script src="../../js/angular-ts.umd.js"></script>
    <script src="../../js/angular-css.umd.js"></script>
  </head>
  <body
    ng-app="angular.css"
    ng-cloak
    ng-init="volume = 75"
    data-example="slider-demo slider-disabled"
  >
    <main class="visual-example">
      <header>
        <label for="volume">Volume</label>
        <output for="volume">{{ volume }}</output>
      </header>
      <input
        id="volume"
        type="range"
        min="0"
        max="100"
        step="1"
        ng-model="volume"
      />

      <header>
        <label for="volume-disabled">Muted</label>
        <output for="volume-disabled">50</output>
      </header>
      <input
        id="volume-disabled"
        type="range"
        min="0"
        max="100"
        step="1"
        value="50"
        disabled
      />
    </main>
  </body>
</html>

Installation

Load the AngularCSS stylesheet. This entry needs no AngularCSS JavaScript or angular.css module dependency. Add AngularTS when using application bindings such as ng-model or ng-click. See Installation for the complete setup.

This entry uses native HTML and CSS. AngularCSS registers no runtime directive for it. Native range input behavior and styling.

Anatomy

Root styling selector

  • input[type="range"]

Semantic structure

Use semantic HTML with the root styling selector above. Native elements provide the structure; the stylesheet supplies presentation.

API

Attributes and state

AttributeAccessPurpose
disabledAuthoredDisables native or component interaction.
maxAuthoredMaximum native or component value.
minAuthoredMinimum native or component value.
orientationAuthoredLayout direction: horizontal or vertical.
stepAuthoredNative numeric step interval.
valueAuthoredNative value or authored component value.

Attributes remain authored HTML, native state, or AngularTS inputs. AngularCSS does not write element state.

CSS custom properties

This styling hook does not define component-specific CSS custom properties.

DOM events

This component does not emit a component-specific custom event.

Native DOM events continue to work normally. AngularTS event directives such as ng-click and ng-keydown, plus the data-change model callback, remain application-owned.

Behavior

Native range input behavior and styling. AngularCSS supplies styling without a runtime directive. Native HTML owns platform behavior; AngularTS owns application values, commands, and authored state.

AngularCSS does not replace AngularTS interpolation, bindings, structural directives, form controllers, validation, or application state.

Accessibility

Associate every control with a visible label. Preserve native required, disabled, and invalid semantics, and connect help or error text with aria-describedby.

Authored accessible names and relationships are preserved. Test the final composition with keyboard navigation and assistive technology because labels and content come from the application.

Customization

Target semantic elements, native state selectors, and component classes with ordinary CSS. Behavior and accessible state remain with native HTML and AngularTS; visual choices belong in the application stylesheet.

Read Customization for layer order, design tokens, state variants, and iframe demo isolation.