title: $:/snippets/themeswitcher

\whitespace trim
\function theme.filter() [all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title<currentTiddler>] +[limit[1]]

<$linkcatcher to="$:/theme">
<div class="tc-chooser" role="listbox">
<$list filter="[plugin-type[theme]sort[title]]">
	<div class={{{ [theme.filter[]then[tc-chooser-item tc-chosen]else[tc-chooser-item]] }}}>
		<$link to={{!!title}} role="option" aria-selected={{{ [theme.filter[]then[true]else[false]] }}}>
			''<$view field="name" format="text"/>''
			&#32;
			<$view field="description" format="text"/>
		</$link>
	</div>
</$list>
</div>
</$linkcatcher>