Return to the GitHub repo.
A web component for authors to track progress towards a word count goal.
Add the <writing-progress>
element to your page with a
word-count
attribute, and it will calculate the progress
towards your goal.
Note that the component is unstyled.
<writing-progress word-count="19873"></writing-progress>
You may optionally define a word count goal. The default value is
100000
.
<writing-progress word-count="46873" goal="50000"></writing-progress>
For a more pleasing presentation, you may define how the word counts
are rounded. Valid options are 1
, 2
,
5
, 10
, 20
, 25
,
50
, 100
, 200
, 250
,
500
, 1000
, 2000
,
2500
, and 5000
.
<writing-progress word-count="39873" round="1000"></writing-progress>
You may optionally provide a start and end date. The default start date is the first day of the current year, and the default end date is the last day of the current year.
<writing-progress word-count="19873" start-date="2020-01-01" end-date="2029-12-31"></writing-progress>
Return to the GitHub repo.