This package is no longer maintained. If you have a well maintained fork, please send me an email so I can add a link to it here.
A collection of Materialize components (templates) to use with Meteor.
In your Meteor app directory:
$ meteor add materialize:materialize fabienb4:materialize-components
-
Materialize.ICONS
-
Materialize.BACKGROUND_COLORS
-
Materialize.TEXT_COLORS
-
Components._schemas
badge
text
=>String
new
=>Boolean
, optionalbackgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optional
button
text
=>String
, optionalicon
=>Object
, optionalname
=>String
inMaterialize.ICONS
aligment
=>String
in["left", "right"]
, default:"left"
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optional
href
=>String
, optionalbackgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optionalwaves
=>Boolean
, optionalfloating
=>Boolean
, optionalflat
=>Boolean
, optionalmodalTrigger
=>Boolean
, optionallarge
=>Boolean
, optionaldisabled
=>Boolean
, optionaloptions
=>Object
, optionaldata-activates
=>String
(for dropdowns), optional- any HTML property usable on
<a>
tag, optional
chip
text
=>String
image
=>String
, optionaltag
=>Boolean
, optional
dropdown
id
=>String
items
=>[Object]
link
=>String
, optionallinkText
=>String
, optionalbadge
=>Object
(seebadge
component), optionaldivider
=>Boolean
(other properties are disregarded if true), optional
icon
name
=>String
inMaterialize.ICONS
size
=>String
in["tiny", "small", "medium", "large"]
, optionalbackgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optionalalignment
=>String
in["left", "right"]
, default:""
circle
=>Boolean
, optional
input
colSize
=>Number
from 1 to 12placeholder
=>String
, optionalname
=>String
type
=>String
label
=>String
, optional
modal
id
=>String
type
=>String
in["modal-fixed-footer", "bottom-sheet"]
, default:""
title
=>String
content
=>String
actions
=>[Object]
, optionallink
=>String
, optionallinkText
=>String
flat
=>Boolean
, optionalbackgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optional
navbar
fixed
=>Boolean
, optionalbackgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optionaltitle
=>Object
link
=>String
side
=>String
in["right", "center"]
, default:""
text
=>String
links
=>[Object]
active
=>Boolean
, optionaloptions
=>Object
, optional- any HTML property usable on
<a>
tag, optional
- any HTML property usable on
icon
=>Object
, optionalname
=>String
alignment
=>String
in["left", "right"]
, default:"left"
linkText
=>String
preloader
size
=>String
in["big", "small"]
, default:""
active
=>Boolean
, default:true
flashing
=>Boolean
, optionalcolor
=>String
in["blue", "red", "yellow", "green"]
, default:"blue"
progress
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
color
=>String
inMaterialize.BACKGROUND_COLORS
type
=>String
in["determinate", "indeterminate"]
, default:"indeterminate"
searchbar
name
=>String
tabs
tabs
=>Object
id
=>String
title
=>String
content
=>String
-
card
cardPanel
=>Boolean
, optionalreveal
=>Boolean
, optionalbackgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optionalsize
=>String
inComponents.Cards.SIZES
, optionaltitle
=>String
, optionalcontent
=>String
image
=>String
, optionalactions
=>Object
, optionallink
=>String
linkText
=>String
-
collapsible
-
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optional -
textColor
=>String
inMaterialize.TEXT_COLORS
, optional -
popout
=>Boolean
, optional -
type
=>String
inComponents.Collapsibles.TYPES
-
items
=>[Object]
active
=>Boolean
, optionalicon
=>Object
, optionalname
=>String
inMaterialize.ICONS
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optional
title
=>String
content
=>String
-
collection
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optionallinks
=>[Object]
, optional: truelink
=>String
linkText
=>String
header =>
String`, optionalitems =>
[Object]`, optionaldismissable
=>Boolean
, optionalavatar
=>Object
, optionalimage
=>String
, optionalicon
=>Object
, optionalname
=>String
inMaterialize.ICONS
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optional
title
=>String
, optionalcontent
=>String
secondaryContent
=>Object
, optionallink
=>String
icon
=>Object
name
=>String
inMaterialize.ICONS
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
, optionaltextColor
=>String
inMaterialize.TEXT_COLORS
, optional
-
parallax
image
=>String
height
=>Number
, optional
-
slider
fullscreen
=>Boolean
, default:false
, optionalslides
=>[Object]
image
=>String
, optionalcaption
=>Object
, optionalalignment
=>String
inComponents.Sliders.ALIGNMENTS
titleColor
=>String
inMaterialize.TEXT_COLORS
, optionaltitle
=>String
, optionalcontentColor
=>String
inMaterialize.TEXT_COLORS
, optionalcontent
=>String
, optional
Basic usage
Template.main.helpers({
card: function() {
return Components.Cards.findOne(this._id);
}
});
<template name="main">
{{> card card}}
</template
Advanced usage (use your imagination!)
// schema for the dynamic components collection
let schema = new SimpleSchema({
// exclude undesired values from keys
type: { type: String, allowedValues: _.takeWhile(_.keys(Components), key => { return ! _.startsWith(key, "_"); }) },
_id: { type: SimpleSchema.RegEx.Id }
});
DynamicComponents = new Mongo.Collection("dynamic-components");
DynamicComponents.attachSchema(schema);
Template.main.helpers({
dynamicComponents: function() {
return DynamicComponents.find();
},
componentTemplate: function() {
// dynamically retrieve the template to use based on the type of component
return Components[this.type].TEMPLATE;
},
componentData: function() {
// dynamically retrieve the component to show
return Components[this.type].findOne(this._id);
}
});
<template name="main">
{{#each dynamicComponents}}
{{> Template.dynamic template=componentTemplate data=componentData}}
{{/each}}
</template>
loadingScreen
backgroundColor
=>String
inMaterialize.BACKGROUND_COLORS
preloader
=>Object
size
=>String
in["big", "small"]
, default:""
flashing
=>Boolean
color
=>String
in["blue", "red", "yellow", "green"]
, default:"blue"
MIT
Anyone is welcome to contribute. Fork, make your changes (test them!), and then submit a pull request.
Bitcoin: 34o6GtZPvVXparT46Zw2kfdxex2SWRpkGS