-
Notifications
You must be signed in to change notification settings - Fork 0
package shared attrs
GitHub Actions edited this page Sep 17, 2026
·
1 revision
Import: import { renderAttrs, classAttrs } from "@tundralibs/ui/shared/attrs"
renderAttrs(attrs: Attrs): HtmlclassAttrs(className: string | "false" | undefined, attrs: Attrs | undefined, arg: (string | "false" | undefined)[]): HtmlMerge a caller's attrs.class into a component's own class list and
render the rest. A second class attribute is silently discarded by
the HTML parser, so every component that accepts attrs renders its
root with this instead of class="…"${renderAttrs(attrs)}.
Root-element attributes for a component: values are escaped normally
through html; undefined entries are dropped (so optional props can
flow straight in without callers filtering them out first).
type Attrs = RecordGuides
Reference