Skip to main content

dash kbar

cmd + k interface for dash applications

dash_kbar_animation

Installation

pip install dash_kbar

Usage

dash_kbar.DashKbar(
    id="input",
    actions=[
        {"name": "Action 1", "id": "action1"},
        {"name": "Action 2", "id": "action2"},
    ],
    style={
        "itemTextColor": "grey",
    },
)

Look into usage.py for a functioning example usage.

API

The following properties are accepted by DashKbar.

Property Description Type Default
id The ID used to identify this component in Dash callbacks str None
actions List of actions to display in the kbar list[dict[str, str]] []
style Style of the kbar dict[str, str] {}
selected ID of the selected item. You can use this prop in callbacks. str None
debug Show the id of the selected item in the browser console bool False

Actions

Actions should be a list of dictionaries with the following keys.

Key Description Type Required
name Name of the action str Yes
id ID of the action str Yes
subtitle Subtitle of the action str No
keywords Keywords of the action list[str] No
section Section of the action str No
icon Icon of the action str No
parent If this is a child item, give the id of the parent str No
actionable Boolean denoting whether selecting this action will change the selected property. Set this to False for parent actions where selecting the parent should show the child actions. bool No
shortcut Shortcut of the action list[str] No

Styling

Style should be a dictionary with one or more of the following keys.

Key Description Default
maxWidth Maximum width of the kbar 600px
width Width of the kbar 100%
background Background color of the kbar white
searchBackground Background color of the search input box transparent
searchTextColor Text color of the search input box grey
fontFamily Font family of the kbar sans-serif
itemTextColor Text color of the items grey
itemSubtitleTextColor Text color of the item subtitles grey
sectionTitleTextColor Text color of the section titles grey
selectedBackground Background color of the selected item rgba(34, 139, 230, 0.1)
selectedTextColor Text color of the selected item grey
selectedLeftBorderColor Left border color of the selected item rgba(34, 139, 230, 1)
boxShadow Box shadow of the kbar 0 0 20px rgba(0, 0, 0, 0.1)
borderRadius Border radius of the kbar 8px
searchBoxFontSize Font size of the search input box 16px
resultFontSize Font size of the items 14px
subtitleFontSize Font size of the item subtitles 12px
sectionTitleFontSize Font size of the section titles 10px

Metadata

Release files for dash-kbar 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dash-kbar 0.4.0
File Size Uploaded Provenance
dash_kbar-0.4.0.tar.gz 101.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dash-kbar 0.4.0
File Interpreter ABI Platform
dash_kbar-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 202.4 kB

Release files / dash_kbar-0.4.0.tar.gz

Download URL dash_kbar-0.4.0.tar.gz
Size 101.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d481dee2e9d860a59e9519ead32a0efee7093bd50c4d33423008fcfa32213089
BLAKE2b-256 checksum
How to use checksums
9eafd43e2e933070d4d415ac2cbdd99ea624b939394d979513ba81f78cde9b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / dash_kbar-0.4.0-py3-none-any.whl

Download URL dash_kbar-0.4.0-py3-none-any.whl
Size 101.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
858fdb2ef7d25ae5e512bb7de93cd9976eb2dde207d751d2f95665699c5ecdb8
BLAKE2b-256 checksum
How to use checksums
2a85aa91564fc78e1380ecb81d966961b06aeb49684567af3cf1a8557ebd46f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for dash-kbar 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page