lightdarkdefaultcompact
Getting StartedInstallationChangelogSupportGithubIntegrationsAngularVueReactDemosFoundationThemesTypographyIconsPopoversInternationalizationDrag and DropKeyboard NavigationLayoutGetting StartedBlockInlineGridComponentsAccordionAlertAlert GroupBadgeBreadcrumbButtonButton GroupButton ExpandButton HandleButton IconButton ResizeButton SortCardChatCheckboxColorData GridDateDialogDividerDrawerDropdownFileFormat DatetimeFormat NumberFormsForm InteractionsForm ValidationHeaderInputMenuMonthNavPaginationPasswordProgress BarProgress CircleProgress DotRadioRangeRatingSearchSelectStepperSwitchTabsTagTextareaTimeToastToggletipTooltipTreeData GridGetting StartedFooterPlaceholderAsyncResponsiveHeightPaginationBordersHoverLayerRange SelectionCSVClipboardColumn AlignmentColumn WidthColumn FixedColumn StickyColumn VisibilityColumn GroupsColumn SpanColumn ResizeDraggable ColumnsDraggable RowsRow HeaderRow Multi SelectRow Single SelectRow HeightRow ActionRow Action BulkRow StickyRow StripeRow FixedRow SortRow Groups

Grid Clipboard

Experimental: work in progress with no guarantees of API stability

The datagrid clipboard feature allows you to copy the contents of a datagrid to the clipboard. This is useful when you want to copy the contents of a datagrid to another application or to another part of the same application.

Example

colcolcolcolcellcellcellcellcellcellcellcellcellcellcellcell
code
<script type="module">
  import '@blueprintui/grid/include/core.js';
  import '@blueprintui/grid/include/clipboard.js';
</script>
<bp-grid aria-label="example datagrid">
  <bp-grid-header>
    <bp-grid-column>col</bp-grid-column>
    <bp-grid-column>col</bp-grid-column>
    <bp-grid-column>col</bp-grid-column>
    <bp-grid-column>col</bp-grid-column>
  </bp-grid-header>

  <bp-grid-row>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
  </bp-grid-row>

  <bp-grid-row>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
  </bp-grid-row>

  <bp-grid-row>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
    <bp-grid-cell>cell</bp-grid-cell>
  </bp-grid-row>
</bp-grid>

Install

NPM

// npm package
import '@blueprintui/grid/include/core.js';
import '@blueprintui/grid/include/clipboard.js';

CDN

<script type="module">
  import 'https://cdn.jsdelivr.net/npm/@blueprintui/grid/include/core.js/+esm';
  import 'https://cdn.jsdelivr.net/npm/@blueprintui/grid/include/clipboard.js/+esm';
</script>

bp-grid

Properties

NameTypesDescription
i18nset default aria/i18n strings
heightstringmax height for grid container
columnLayout'fixed' | 'flex'column layout determines initial column width calculation
rowStylePermutations< 'hover' | 'stripe' | 'border' >determines the visual style for rows
columnStylePermutations<'hover' | 'border'>determines the visual style for columns
selectable'multi' | 'single' | nullinitializes grid to appropriate aria/a11y settings for selections
scrollLockbooleandisables scroll container
layer'flat' | 'container'determines the visual layer style (container vs flat for nesting)
gridHTMLElement[][]
rolestring

Attributes

NameTypesDescription
i18nset default aria/i18n strings
heightstringmax height for grid container
column-layout'fixed' | 'flex'column layout determines initial column width calculation
row-stylePermutations< 'hover' | 'stripe' | 'border' >determines the visual style for rows
column-stylePermutations<'hover' | 'border'>determines the visual style for columns
selectable'multi' | 'single' | nullinitializes grid to appropriate aria/a11y settings for selections
scroll-lockbooleandisables scroll container
layer'flat' | 'container'determines the visual layer style (container vs flat for nesting)
range-selectionboolean

CSS Properties

NameTypesDescription
--background
--body-height
--scrollbar-background
--scrollbar-thumb-background
--column-height
--row-height
--scroll-padding-top
--row-content-visibility
--border-width