MyGit
🚩收到GitHub仓库的更新通知

Rich-Harris/svelte-split-pane

Fork: 8 Star: 98 (更新于 2024-04-30 15:57:11)

license: 暂无

Language: Svelte .

A component

官方网址 GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

svelte-split-pane

A <SplitPane> component.

Usage

<script>
  import { SplitPane } from '@rich_harris/svelte-split-pane';

  const dividerColor = 'black';
  const dividerThickness = '20px';
</script>

<SplitPane
  type="horizontal"
  id="main"
  min="100px"
  max="-100px"
  pos="50%"
  priority="min"
  --color={dividerColor}
  --thickness={dividerThickness}
>
  <section slot="a">this is on the left</section>
  <section slot="b">this is on the right</section>
</SplitPane>

Of the properties that can be set on the component, only type is required:

  • type can be horizontal, in which case the panes will be split left-right, or vertical in which case it will be split top-bottom
  • id will be added to the element as a data-pane={id} attribute, allowing you to (for example) override the --pos CSS custom property on mobile
  • min, max and pos can be expressed as ${number}%, ${number}px, ${number}em or ${number}rem. Positive numbers are measured from the left/top, negative numbers are measured from the right/bottom
  • priority determines whether the min or max constraint wins in cases where they conflict
  • --color determines the color of the divider between panes, and defaults to transparent
  • --thickness determines how thick the 'hit area' is for the divider, and defaults to 8px

最近版本更新:(数据更新于 2024-04-30 05:50:46)

Rich-Harris/svelte-split-pane同语言 Svelte最近更新仓库

2024-05-18 16:13:27 windmill-labs/windmill

2024-05-09 02:05:07 open-webui/open-webui

2024-05-04 06:36:02 matt8707/ha-fusion

2024-05-03 12:44:14 saadeghi/daisyui

2024-04-26 20:20:58 goniszewski/grimoire

2024-04-26 14:42:04 hcengineering/platform