Skip to content

Commit 7a54d69

Browse files
authored
Update README.md
1 parent 08e7466 commit 7a54d69

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,55 @@ Vue.component('test', Test)
108108

109109
# Usage
110110

111-
> TODO
111+
Plugin will register a global component with name `CircleSlider` so you can just use it right away:
112+
113+
```html
114+
...
115+
<circle-slider v-model="sliderValue"></circle-slider>
116+
...
117+
```
118+
119+
or you can adjust some properties:
120+
121+
```html
122+
...
123+
<circle-slider
124+
v-model="sliderValue"
125+
:side="150"
126+
:min="0"
127+
:max="10000"
128+
:stepSize="100"
129+
:circleWidthRel="20"
130+
:progressWidthRel="10"
131+
:knobRadius="10"
132+
></circle-slider>
133+
...
134+
```
135+
136+
## Interface
137+
138+
### Props
139+
140+
| Props | Type | Default | Description |
141+
| ---------------- |:--------------| ---------|--------------|
142+
| side | Number | 100 | size of a side of a svg square in px |
143+
| min             | Number       | 0 | the minimum value |
144+
| max | Number | 100 | the maximum value |
145+
| stepSize | Number | 1 | the gap between the values |
146+
| circleColor | String | `#334860`| color of slider circumference |
147+
| progressColor | String | `#00be7e`| color of progress curve |
148+
| knobColor | String | `#00be7e`| knob color |
149+
| knobRadius | Number | null | exact knob radius in px |
150+
| knobRadiusRel   | Number       | 7       | relative knob radius. will be calculated as `(side/2) / knobRadiusRel` |
151+
| circleWidth | Number | null | exact width of circle in px |
152+
| circleWidthRel | Number | 20 | relative circle width. will be calculated as `(side/2) / circleWidthRel` |
153+
| progressWidth | Number | null | exact progress curve width in px |
154+
| progressWidthRel | Number | 10 | relative progress curve width. will be calculated as `(side/2) / progressWidthRel` |
112155

113156
# Example
114157

115-
> TODO
158+
- [Working demo](#)
159+
- [Repo](#)
116160

117161
---
118162

0 commit comments

Comments
 (0)