Data display

Drawer

Inspect a project’s files in a side drawer with selectable rows, file details and sync status.

Open ↗
Drawer interaction recorded with the Blinc headless renderer
Hybrid · dark · native recording · 2×

Usage and properties

The project browser reuses Tree View for expandable folders, keyboard navigation and file selection; a bound details panel follows the selected node.

Use the installation guide to add blinc_cn and its component stylesheet. Create the fixture bindings once, and return the demo from your UI builder. Values marked Bound accept Signal/Computed sources where the API supports them; structural options configure the component at construction.

PropertyTypeUpdate modelThis example
title / childstring and child builderConstructionProject files

Keyboard and interaction

Tab stays inside the open drawer and Escape closes it. Focus returns to the trigger.

Customizing it

Add application CSS after the default component layer. These selectors are the restyling surface for this component:

  • .cn-drawer
  • .cn-drawer-header
  • .cn-drawer-title
  • .cn-drawer-close
  • .cn-drawer-separator
  • .cn-drawer-footer
  • .demo-project-summary
  • .demo-project-tree
  • .cn-tree-row
  • .cn-tree-icon
  • .cn-tree-group

Theme and component variables: --primary, --text-primary, --text-secondary, --surface, --border, --radius-default, --duration-fast, --ease-state.

Built-in themes

The Live theme control installs Blinc's own theme bundles, including their colours, focus rings, corner shapes and motion tokens.

pub fn theme_bundle_for(name: &str) -> blinc_theme::ThemeBundle {
    match name {
        "restrained" => blinc_theme::RestrainedTheme::bundle(),
        "expressive" => blinc_theme::ExpressiveTheme::bundle(),
        _ => blinc_theme::HybridTheme::bundle(),
    }
    .with_css(blinc_cn::cn_styles::CN_STYLES)
}

Download the default widget and component stylesheets. Sample assets and licenses are available in the asset guide.

Documentation

From the canonical component guide.

A drawer is a left or right navigation panel, with the left as the default:

button("Open navigation").on_click(|_| {
    drawer_left()
        .size(DrawerSize::Medium)
        .title("Workspace")
        .child(|| div().child(text("Projects and recent activity")))
        .footer(|| div().child(muted("Signed in as Jane")))
        .show();
})

DrawerSide has Left and Right; DrawerSize has Narrow, Medium and Wide. Use a bottom sheet for a panel entering from below. .header(|| ...) replaces the title header. Each .child(|| ...) adds a body section.

When opened with the keyboard, a dialog focuses its first enabled control. Tab and Shift+Tab stay inside the topmost dialog or nested popup. Closing restores focus to the opening control if it still exists and is enabled. Pointer focus uses the same target without a keyboard outline; keyboard navigation uses the shared :focus-visible rules.

Platforms and version

The component API is available in Blinc 0.6.0. The Live example runs in a dedicated worker and requires a compatible GPU surface. Preview and Code remain available when Live cannot start. The canvas has a descriptive label; a full screen-reader DOM mirror is not provided. The gallery integration is based on revision e2e55c24e078.

Recordings and live demos use the default Hybrid theme with bundled Noto Sans. The recording uses a 560 × 480 logical viewport at twice that resolution. Live follows its container and actual display density. Source base revision · Exact build source · Artifact versions and checksums · Font license.