Mixins / foldkit-mixins-ui

Icons

namespace · packages/mixins-ui/src/icons.ts:7

export * as Icons from './icons.js'

Attribute-dispatched mask icons: mechanisms, not components. An element shows the icon its attribute names, drawn from --icon over the text's color. Where an icon comes from (a data URI, a file) is the application's: pass resolved url(…) strings. No slots, no views.

In the guides

Members

Icons.byAttribute

function · packages/mixins-ui/src/icons.ts:22

function byAttribute(
  attribute: string,
  icons: Readonly<Record<string, string>>,
): StyleValue

Sets --icon by an attribute's value: each value its own icon.

Icons.glyph

function · packages/mixins-ui/src/icons.ts:10

function glyph(size: string): StyleValue

Draws the icon in --icon before the element's words, in their color.