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

Button Resize

The resize button component is used to act as a drag handle to resize an element. Key navigation is supported and the step value can be used to adjust the amount of change when using the arrow keys.

Example

code
<bp-button-resize aria-label="resize item" value="250" min="20" max="480" style="height: 50px"></bp-button-resize>

<script type="module">
  import '@blueprintui/components/include/button-resize.js';
  document.querySelector('bp-button-resize').addEventListener('input', (event) => console.log(event.target.valueAsNumber));
</script>

Disabled

code
<bp-button-resize disabled aria-label="resize item" value="250" min="20" max="480" style="height: 50px"></bp-button-resize>

<script type="module">
  import '@blueprintui/components/include/button-resize.js';
  document.querySelector('bp-button-resize').addEventListener('input', (event) => console.log(event.target.valueAsNumber));
</script>

The disabled attribute should be used for UI elements that are currently disabled, making them uninteractive. This attribute informs assistive technologies like screen readers that the element, while present in the document structure, is not usable or cannot be interacted with in its current state.

Split

0
code
<div style="display: grid; grid-template-columns: 1fr 2px 1fr; height: 250px; width: 100%">
  <div style="background: hsla(0, 0%, 0%, 0.15)"><span id="split-demo-value">0</span></div>
  <bp-button-resize id="split-demo" aria-label="resize item" step="1" style="height: 250px"></bp-button-resize>
  <div></div>
</div>

<script type="module">
  import '@blueprintui/components/include/button-resize.js';

  const resize = document.querySelector('#split-demo');
  resize.step = 10;
  resize.min = 20;
  resize.max = document.documentElement.clientWidth - 44;
  resize.value = document.documentElement.clientWidth / 2;
  resize.addEventListener('input', (event) => {
    resize.parentElement.style.gridTemplateColumns = event.target.valueAsNumber + 'px 2px 1fr';
    document.querySelector('#split-demo-value').innerHTML = event.target.valueAsNumber;
  });
</script>

Install

NPM

// npm package
import '@blueprintui/components/include/button-resize.js';

CDN

<script type="module">
  import 'https://cdn.jsdelivr.net/npm/@blueprintui/components/include/button-resize.js/+esm';
</script>

Accessibility

  • Use a clear, descriptive label for the button that communicates its purpose.
  • Provide a way for keyboard users to interact with the resize button.
  • Provide alternative ways for users who have difficulty using a mouse or trackpad to move the handle, such as by using the arrow keys.

bp-button-resize

Properties

NameTypesDescription
valuestring | number | FormData | Filedetermines initial value of the control
minnumberdefines the most negative value in the range of permitted values
maxnumberdefines the greatest value in the range of permitted values
stepnumbernumber that specifies the granularity that the value
orientation'vertical' | 'horizontal'
formAssociatedboolean
disabledbooleandetermines if element is mutable or focusable
requiredbooleanindicates that the user must specify a value for the input before the owning form can be submitted
readonlybooleanmakes the element not mutable, meaning the user can not edit the control
multiplebooleandetermines he form control accepts one or more values
autocompletestringprovide automated assistance in filling out form field values, and guidance to the browser as to the type of information expected in the field
typestringstring specifying the type of control to render
namestringrepresents the name of the current
element as a string.
patternstringregular expression the form control's value should match
placeholderstringdefines a short hint to help the user with data entry when a form control has no value
minLengthnumberdefines minimum number of characters
maxLengthnumberdefines maximum number of characters
sizenumberdetermines number of characters
valueAsNumber
composedLabel
focus
reset

Attributes

NameTypesDescription
valuestring | number | FormData | Filedetermines initial value of the control
minnumberdefines the most negative value in the range of permitted values
maxnumberdefines the greatest value in the range of permitted values
stepnumbernumber that specifies the granularity that the value
orientation'vertical' | 'horizontal'
disabledbooleandetermines if element is mutable or focusable
requiredbooleanindicates that the user must specify a value for the input before the owning form can be submitted
readonlybooleanmakes the element not mutable, meaning the user can not edit the control
multiplebooleandetermines he form control accepts one or more values
autocompletestringprovide automated assistance in filling out form field values, and guidance to the browser as to the type of information expected in the field
typestringstring specifying the type of control to render
patternstringregular expression the form control's value should match
placeholderstringdefines a short hint to help the user with data entry when a form control has no value
minLengthnumberdefines minimum number of characters
maxLengthnumberdefines maximum number of characters
sizenumberdetermines number of characters

CSS Properties

NameTypesDescription
--background
--width
--height