이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

ButtonWidget/Example/SelectedState

2026년 7월 24일 오후 11:58

This example combines four attributes so a row of buttons can show which colour is active:

  • set and setTo write the chosen colour to a state tiddler
  • selectedClass marks the button whose setTo matches the current value of set
  • default gives the value to compare against while the set tiddler does not yet exist

Because default is red, the Red button starts out selected. Click another colour to move the selection.

titleOutput

Selected colour: red