<Range> Component

<Range> is an interactive control in order to accept numeric value within a specified range.

Here the demo:

Preview

Installing <Range> Component

There are 2 ways to install <Range> component into your react app project:

  • Install the Specific Package of <Range> Component
  • Install the Whole Reusable-UI Component Pack, including the <Range> Component

Variant Properties

The alternative appearances of the <Range> layout without changing the <Range>'s functionality.

orientation Property

Sets the orientation of the <Range>.

The possible values are:

  • undefined
  • 'inline'
  • 'block'

Here the preview:

Preview

Show code

size Property

Defines the alternative size of the <Range>.

The possible values are:

  • undefined
  • 'sm'
  • 'md'
  • 'lg'

Here the preview:

Preview

Show code

theme Property

Defines the contextual theme of the <Range>.

The possible values are:

  • undefined
  • 'primary'
  • 'secondary'
  • 'success'
  • 'info'
  • 'warning'
  • 'danger'
  • 'light'
  • 'dark'

Here the preview:

Preview

Show code

gradient Property

Activates a 3D mode of the <Range>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview

Show code

outlined Property

Activates an outlined mode (background-less, contrast foreground, and contrast border) of the <Range>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview

Show code

mild Property

Activates a mild mode (mild background, contrast foreground, and contrast border) of the <Range>.

The possible values are:

  • undefined
  • 'inherit'
  • true
  • false

Here the preview:

Preview

Show code

nude Property

Activates an nude mode (background-less, padding-less, and border-less) of the <Range>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview

Show code

State Properties

The conditions of the <Range> behavior or functionality.

enabled Property

Defines the enabled/disabled state of the <Range>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview

Show code

inheritEnabled Property

Influences the <Range>'s disabled state by <ancestor enabled={false}>.

The possible values are:

  • undefined
  • true
  • false

Here the preview:

Preview

Show code

readOnly Property

Defines the readOnly/mutable state of the <Range>.

The possible values are:

  • undefined
  • true
  • false

inheritReadOnly Property

Influences the <Range>'s readOnly by <ancestor readOnly={true}>.

The possible values are:

  • undefined
  • true
  • false

enableValidation Property

Activates the valid/invalid indicator of the <Range>.

The possible values are:

  • undefined
  • true
  • false

isValid Property

Marks the validity status of the <Range>.

The possible values are:

  • undefined
  • null
  • true
  • false

Here the preview:

Preview

Show code

inheritValidation Property

Influences the <Range>'s valid/invalid indicator by <ancestor isValid={true|false} enableValidation={true}>.

The possible values are:

  • undefined
  • true
  • false

Component Properties

Overwrites the internal (sub) components used as the composition of <Range> component.

trackLowerComponent Property

Overwrites the internal <Generic> component used as the lower track of <Range> component.

trackUpperComponent Property

Overwrites the internal <Generic> component used as the upper track of <Range> component.

trackRef Property

Gets the DOM reference of the internal <EditableControl> component used as the main track of <Range> component.

<Range trackRef={fooTrackRef} />
is equivalent to:
<Range trackComponent={
    <EditableControl elmRef={fooTrackRef} />
} />

trackLowerRef Property

Gets the DOM reference of the internal <Generic> component used as the lower track of <Range> component.

<Range trackLowerRef={fooTrackLowerRef} />
is equivalent to:
<Range trackLowerComponent={
    <Generic elmRef={fooTrackLowerRef} />
} />

trackUpperRef Property

Gets the DOM reference of the internal <Generic> component used as the upper track of <Range> component.

<Range trackUpperRef={fooTrackUpperRef} />
is equivalent to:
<Range trackUpperComponent={
    <Generic elmRef={fooTrackUpperRef} />
} />

thumbRef Property

Gets the DOM reference of the internal <EditableActionControl> component used as the thumb of <Range> component.

<Range thumbRef={fooThumbRef} />
is equivalent to:
<Range thumbComponent={
    <EditableActionControl elmRef={fooThumbRef} />
} />

trackClasses Property

Appends the CSS class of the internal <EditableControl> component used as the main track of <Range> component.

<Range trackClasses={['boo', 'foo']} />
is equivalent to:
<Range trackComponent={
    <EditableControl classes={['boo', 'foo']} />
} />

trackLowerClasses Property

Appends the CSS class of the internal <Generic> component used as the lower track of <Range> component.

<Range trackLowerClasses={['boo', 'foo']} />
is equivalent to:
<Range trackLowerComponent={
    <Generic classes={['boo', 'foo']} />
} />

trackUpperClasses Property

Appends the CSS class of the internal <Generic> component used as the upper track of <Range> component.

<Range trackUpperClasses={['boo', 'foo']} />
is equivalent to:
<Range trackUpperComponent={
    <Generic classes={['boo', 'foo']} />
} />

thumbClasses Property

Appends the CSS class of the internal <EditableActionControl> component used as the thumb of <Range> component.

<Range thumbClasses={['boo', 'foo']} />
is equivalent to:
<Range thumbComponent={
    <EditableActionControl classes={['boo', 'foo']} />
} />

trackStyle Property

Appends the inline CSS of the internal <EditableControl> component used as the main track of <Range> component.

<Range trackStyle={{ opacity: 0.5, cursor: 'pointer' }} />
is equivalent to:
<Range trackComponent={
    <EditableControl style={{ opacity: 0.5, cursor: 'pointer' }} />
} />

trackLowerStyle Property

Appends the inline CSS of the internal <Generic> component used as the lower track of <Range> component.

<Range trackLowerStyle={{ opacity: 0.5, cursor: 'pointer' }} />
is equivalent to:
<Range trackLowerComponent={
    <Generic style={{ opacity: 0.5, cursor: 'pointer' }} />
} />

trackUpperStyle Property

Appends the inline CSS of the internal <Generic> component used as the upper track of <Range> component.

<Range trackUpperStyle={{ opacity: 0.5, cursor: 'pointer' }} />
is equivalent to:
<Range trackUpperComponent={
    <Generic style={{ opacity: 0.5, cursor: 'pointer' }} />
} />

thumbStyle Property

Appends the inline CSS of the internal <EditableActionControl> component used as the thumb of <Range> component.

<Range thumbStyle={{ opacity: 0.5, cursor: 'pointer' }} />
is equivalent to:
<Range thumbComponent={
    <EditableActionControl style={{ opacity: 0.5, cursor: 'pointer' }} />
} />

Variables

There are several variables of <Range> you can customize. Changing the variables affects all <Range> instance and other components that depend on <Range>.

Here the exposed variables:

  • Sizes
  • Accessibilities
  • Tracks
  • Thumbs

The example of accessing, modifying, & adding variables:

Show code