Dash-prefix a utility library used to prefix ID name spaces

A utility library that allows component IDs to use prefixed name spaces. This greatly reduces Dash component ID conflicts. A component ID is only defined once when the component is created. It is then used by reference in associated Dash callbacks.

import dash_prefix

btn1 = html.Button("Button 1", id='btn1')
title = html.H1('Title', id='title')

@callback(title.output.children, btn1.input.n_clicks)
def _update(clicks):
    ...

See dash-prefix for additional details.

3 Likes

Another option is to use the PrefixIdTransform from dash-extensions :slight_smile:

2 Likes

Very nice creation. Thanks for sharing, @jonesst2608