A UI component system for Meteor-Blaze and TailwindCSS.
Register and extend Tailwind-based UI Components in Blaze.
This object can also be accessed inside methods, such as
attributes
, where it is passed as api
parameter.
- Source:
Examples
<template name="Hoverable">
<div {{blazeui_atts}}>
{{> Template.contentBlock}}
</div>
</template>
import { BlazeUI } from 'meteor/blazeui:core'
import './Hoverable.html'
BlazeUI.register({
name: 'Hoverable',
class: 'bg-transparent hover:bg-primary text-foreground hover:text-primary-foreground'
})
Methods
(static) attributes() → {Attributes}
Returns the global Attributes resolver implementation
- Source:
Returns:
- Type
- Attributes
(static) register(values)
Registers one or many new {Component} definitions.
Parameters:
Name | Type | Description |
---|---|---|
values |
Array.<UIComponent> |
- Source:
(static) state() → {State}
Returns the global shared-State resolver implementation
- Source:
Returns:
- Type
- State
(static) styles() → {Styles}
Returns the global Styles resolver implementation
- Source:
Returns:
- Type
- Styles
(static) theme() → {Theme}
Returns the global Theme resolver implementation
- Source:
Returns:
- Type
- Theme
(static) variants(ctx, type, valuesopt, defaultValueopt)
Add/update variants of a given UIComponent context.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ctx |
UIComponent | ||
type |
string | ||
values |
object |
<optional> |
|
defaultValue |
string |
<optional> |
- Source: