Skip to content
esr360 edited this page Jul 17, 2019 · 57 revisions

Props

Prop Type Description
[name] String The name of the module to be used when rendering to the DOM (if not passed a unique name in the format module-1 will be used)
[styles] (Object|Function|Array) Your module's styles
[config] (Object|Function) Your module's configuration
[theme] (Object|Function) Your project's/UI's theme
[tag='div'] (String|React Element) HTML tag or React Component to use when rendering the module
[component] (React Element|Array) You can supply a React component to render instead a div/HTML tag
[id] String Standard id HTML attribute (learn more)
[className] String CSS classes to add to the rendered component
[href] String Standard href attribute for anchor tags - adding this prop will automatically set tag to a
[data-attribute] String Any data-attribute
[on{Event}] Function Any valid GlobalEventHandler (you must use camelCase to be compatible with React)
[attributes] Object If you need to send any other attributes to the rendered DOM node, you can pass them here
[disableClassNames=false] Boolean If you wish for Lucid to not output any CSS class names to the DOM, enable this option (can be set globally)
[separateClasses=false] Boolean If you wish for Lucid to generate separate classes for each modifier, enable this option (can be set globally)
[componentGlue='__'] String The glue to connect component names to other components/the parent module in the generated CSS class names (can be set globally)
[modifierGlue='--'] String The glue to connect modifiers to modules/components in the generated CSS class names (can be set globally)

Global Props

Certain props can be set globally (as specified in the above table). @TODO

Clone this wiki locally