# Slider
Any value on the precision ruler: a player’s volume with its mute, a number or a helper, a fan’s speed, another entity’s switch in its head.
`custom:fluvy-slider-card` · [Try it live](https://acosta290.github.io/fluvy/?card=slider) · [All cards](../cards.md#everyday)
## Example
```yaml
type: custom:fluvy-slider-card
entity: media_player.sl_soundbar
```
The picture above, on the demo house: put your own entities in place of its.
## Layouts
`variant` chooses the layout. The picture above is `full`, the default; each of the others is the example plus the line over it, and opens in the live demo.
variant: compact
variant: tile
## All options
```yaml
type: custom:fluvy-slider-card
entity: media_player.sl_soundbar
# name:
# icon:
show_icon: auto
name_lines: 1
variant: full
show_stepper: true
control: auto
# toggle_entity:
# min:
# max:
# label:
live_update: false
slider_style: house
# tone:
# color:
# card_color:
# card_opacity: 100
# card_border: true
# unavailable: dashed
# tint: 'off'
# tap_action:
# action: more-info
# hold_action:
# action: more-info
# double_tap_action:
# action: none
# icon_tap_action:
# action: none
# icon_hold_action:
# action: none
# icon_double_tap_action:
# action: none
```
## Options
| Option | Default | What it does |
| --- | --- | --- |
| `entity` | **required** | The player, number or fan the slider sets. A `media_player`, `number`, `input_number` or `fan`. |
| `name` | | The name the card shows, in place of the entity’s own. |
| `icon` | | The card’s icon, in place of the entity’s own. |
| `variant` | `full` | The card’s layout. `full` · `compact` · `tile`. |
| `show_stepper` | `true` | Shows the − and + buttons. |
| `control` | `auto` | What the round in the head switches. `auto` · `mute` · `switch` · `none`. |
| `toggle_entity` | | Another entity whose switch stands in the head, such as a soundbar’s power. A `switch`, `input_boolean`, `light`, `fan` or `media_player`. |
| `min` | | The bottom of the slider, in the entity’s unit. |
| `max` | | The top of the slider, in the entity’s unit. |
| `label` | | The words over the slider. |
| `live_update` | `false` | Sends the value while the slider is dragged, not only when it is let go. |
| `slider_style` | `house` | The slider’s style; left out, the style set for every slider. `house` · `ruler` · `bar` · `liquid` · `fill`. |
| `slider_words` | `ends` | Writes the words at the slider’s ends, or none. `ends` · `none`. |
| `tint` | `off` | When the card shows its colour on its surface. `off` (Never) · `on` (When on) · `always`. |
Its look and its actions, as on every card
| Option | Default | What it does |
| --- | --- | --- |
| `show_icon` | `auto` | Shows the icon, hides it, or lets the card decide. `auto` · `always` · `never`. |
| `name_lines` | `1` | Lets the name in the card’s head take two balanced lines where one would cut it; the head is a line taller whatever the name. `1` · `2`. |
| `tone` | the card’s own | The card’s colour from the palette’s tones; left out, the tone of what it shows. `accent` · `light` · `heat` · `cool` · `dry` · `fan` · `water` · `solar` · `grid` · `media` · `presence` · `armed` · `battery` · `house` · `gas` · `vehicle` (Car) · `neutral` · `ok` (Good) · `warning` · `danger`. |
| `color` | | The card’s colour: its circle, its accents and its tints wear it. Left out, the colour of what it shows. |
| `card_color` | | Paints the card’s surface in a colour of your own. |
| `card_opacity` | `100` | How solid the card’s surface is, in percent: under 100 the view’s background shows through. Left out, the house’s. 0 % to 100 %, in steps of 5. |
| `card_border` | `true` | Whether the card draws its hairline border. Left out, the house’s. |
| `unavailable` | `dashed` | How the card looks while its entity is unavailable: dashed, or quiet as when it is off. Left out, the house’s. `dashed` · `quiet` (As when off). |
| **Interactions** | | |
| `tap_action` | `more-info` | What a tap on the card does. |
| `hold_action` | `more-info` | What a long press on the card does. |
| `double_tap_action` | `none` | What two taps on the card do. |
| `icon_tap_action` | `none` | What a tap on the icon does. |
| `icon_hold_action` | `none` | What a long press on the icon does. |
| `icon_double_tap_action` | `none` | What two taps on the icon do. |
More about them in [Options every card takes](../customising.md#options-every-card-takes).
## Guide
The slider card sets any value on the light card's ruler: a media player's volume, a `number` or `input_number` in its
own range and step, or a fan's speed.
```yaml
# a soundbar whose volume is a number and whose power is a switch
type: custom:fluvy-slider-card
entity: number.soundbar_volume
toggle_entity: switch.soundbar_power
name: Soundbar
variant: compact
live_update: true # sends while you drag, not only on release
```
```yaml
# a player's volume, kept under 60 %
type: custom:fluvy-slider-card
entity: media_player.living_room
max: 60
```
- `min` and `max` narrow the ruler within the entity's range. `label` names the figure (Volume, Speed or Value by
default).
- `control: auto` puts what fits at the head's end: mute for a player, the switch for a fan, or `toggle_entity`'s
switch. `mute`, `switch` or `none` ask for one.
- A range across zero (an offset of −2 to +2) is lit from zero to the knob, its figures signed.
- `variant: compact` keeps the head and the ruler; `tile` is a large tile with the ruler at its foot.
- `tint`: the colour on the surface while what it sets is on (`on`, a tile's default), at rest too (`always`), or never
(`off`, the full and compact card's default).
Older names the card still reads
| Older name | Read as |
| --- | --- |
| `layout` | `variant` |
| `view` | `variant` |
| `accent` | `color` |