Note
A contextual message block within the content, not full width. It’s the place for clarifications, warnings, and tips that sit right next to what they explain. It supports a title, actions, and a close button.
Feedback and status · TaishoDS Core, in plain HTML.
Examples
One working example per case. Each example is the HTML of its preview—copy it as is, and with Core’s CSS and JS loaded, it looks and works the same.
Informational tip
Tip
Warning
Heads up
Dismissible danger
Careful
Class reference
Every value of each modifier, with its HTML ready to copy.
Variant
The color for the note’s tone: default, success, warning, info, or danger.
Tip
Ready
Heads up
What’s new
Careful
When to use
- The clarification only makes sense next to what it accompanies (a step, a field, a paragraph).
- You want to highlight something in the content without taking the user away from where they are.
- You need hierarchy by variant (info, success, warning, danger) within the page.
When not to use
- The status applies to the whole page or app →
banner. - It’s ephemeral and doesn’t need to stay written down →
toast. - It’s only a short status label, with no prose →
badge.
Do
- Place the note next to what it explains, not at the end of the page.
- Use
ts note-titlewhen the body runs longer than one line. It gives the gist at a glance.
Don’t
- Don’t sprinkle notes every other paragraph. If everything is highlighted, nothing is.
- Don’t put essential information in a dismissible note.
TaishoDS Core
Needs Core’s JS, which hooks in through data-ts-* attributes.
The dismissible note hides with its close button, and Core handles that.
Core hooks into it through these attributes. They go in the markup, and there’s nothing to initialize.
data-ts-dismissdata-ts-dismissible
What it does: The data-ts-dismiss button hides the note (data-ts-dismissible) and notifies with ts:change. Without a close button it is static markup.
From the CDN, without a build, load taisho.note.css along with taisho.base.css. Also load:
taisho.button.csstaisho.icon.csstaisho.spinner.css
For how Core works in general, see Behavior.
Accessibility
- Color is never the only indicator. The automatic icon and the text convey the variant.
- The close button exposes its own
aria-label.
Verification
What was actually tested. Anything that wasn’t tested says so—we’d rather say “not verified” than claim too much.
- axe WCAG 2.2 A + AA in a real browser, in light and dark mode, before every release.
- keyboard Adds no keys of its own—it uses the browser’s native behavior.
- screen reader Not verified with a screen reader. Test it in your own combination of components, not just here, where each one appears alone and on its happy path.