Sajari UI

Style Props

TBC - This should be auto generated.

The 'as' prop

The as prop is a feature that all of our components have, similar to that in emotion or styled components. It allows you to pass a HTML tag or another component to a Sajari component to be rendered as the base tag of that component along with all it's styles and props.

For example, say you are using a Button component, and you need to make it a link instead. You can compose a and Button like this:

Editable Example

This allows you to use all of the Button props and all of the <a> props without having to wrap the Button in an a component.