Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.06 KB

README.md

File metadata and controls

25 lines (17 loc) · 1.06 KB

Ripple | Needs

Coverage Status Build Status

Extends the rendering pipeline to apply default attributes defined for a component.

General syntax for the needs header is:

needs: [attr1=value2][attr2=value3 value4]

Most components have their own default base CSS. Instead of requiring consumers to add this, specifying the following header in the resource defintion will always load the component's CSS (the value here conventionally defaults to component-name.css):

needs: '[css]'

Components within an application may also require certain data resources:

needs: '[data=foo]'

The value of attributes are extended rather than overwritten. So a consumer can still specify any attributes which may modify the behaviour of the component, but will not need to also add the essential attributes the component itself always requires.