Base

  • Colors
  • Icons
  • Logos
  • Shadows and Elevations
  • Spacing
  • Typography

Components

  • Accordion
  • Avatars
  • Badges
  • Buttons
  • Cards
  • Character Counter
  • Device Type Icons
  • Draggables
  • Dropdowns
  • Droppables
  • Expandable image
  • Filters
  • Gallery card
  • Icon Button
  • Indicators
  • Lightbox image
  • Lists
  • Loading
  • Messages
  • Pictogram
  • Poster Play
  • Progress bar
  • QR Code
  • Rating stars
  • Row Selector
  • Segmented Controls
  • Sentiment
  • Split View
  • Tables
  • Tags
  • Tester vitals
  • Toggle button
  • Typeahead

Form

  • Card Select
  • Checkbox
  • Combobox
  • Form Rule
  • Hint
  • Input
  • Input Title
  • Label
  • Multi-select List
  • Search
  • Select
  • Single-select List
  • Sliders
  • Switch
  • Text Area

Layout

  • Containers
  • Layers
  • Layout
  • Split Layout
  • Wrappers

Navigation

  • Context Switcher
  • Nav bar
  • Navigation
  • Pagination
  • Sidebar Navigation
  • Step Navigation
  • Tabs

Overlay

  • Banners
  • Bulk Selector
  • Modals
  • Popovers
  • Toast
  • Tooltips
  • User Notifications

Patterns

  • Full Page Message
  • Question card & Group Questions Container

Visualizations

  • Data Colors

Character Counter

Wrap an input or textarea to keep count

Bottom counter

Expand Copy
<tk-character-counter
count-down="true"
input-size="medium"
max-length="200"
placement="bottom"
warning-text="Try breaking down larger tasks and questions"

>   <label class="form__label form__label--stacked">

    Task
    <textarea
      oninput="characterCountExampleChanged(event)"
      class="form-input form-input--textarea"
    ></textarea>

  </label>
</tk-character-counter>

<script>
  const characterCounterElement = document.getElementsByTagName('tk-character-counter')[0];
  const characterCountExampleChanged = (event) => {
    characterCounterElement.setAttribute('text', event.srcElement.value)
  }
</script>

Description

Wrap any input or textarea that needs a way to count its characters with <tk-character-counter>.

The input or textarea must provide a way to pass out the value being entered into the field so that the counter component can update the counts it checks against.