Background Indicators

Creates a colorful ribbon that accepts text, a background image and a link embedded.

WARNING avoid special symbols such as (, ), [, ] and similar in the texts of this component because it could break the look&feel

Input variables:

title: str

And accepts the following input variables as optional:

background_url: Optional[str]
href: Optional[str]

Example of use:

s.plt.html(
    order=0,
    html=s.html_components.beautiful_indicator(
        title='Start',
        href='https://docs.shimoku.com/development/'
    )
)
You can click on any place of the indicator to reach the link embedded. The page will open in the same window.

You can resize, change position and text at will, for example:

s.plt.html(
    order=0, cols_size=5,
    padding='1,0,0,2',
    html=s.html_components.beautiful_indicator(
        title='Start reading',
        background_url='https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8N3x8dGVjaG5vbG9neXxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=600&q=60',
        href='https://docs.shimoku.com/development/'
    )
)
Note the space before the component obtained using padding='1,0,0,2'. The order of the spaces is Top, Right, Bottom, Left. If you clock on the ribbon, you are redirected to https://docs.shimoku.com/development/, that is a link you can modify as you want.

More on how to use the Grid.

Video demonstration

Last updated

Was this helpful?