# Shortcut button

```js
<SilkeBox
  align="center"
  fill
  style={{ background: 'white', borderRadius: 'var(--border-radius-small)' }}
>
  <SilkeBox column align="center" gap="xs" style={{ width: '200px' }}>
    <SilkeShortcutButton label="Add text" icon="text" shortcut={['t']} />
    <SilkeShortcutButton label="Add frame" icon="frame" shortcut={['f']} />
    <SilkeShortcutButton label="Add image" icon="image" shortcut={['i']} />
    <SilkeShortcutButton label="Add video" icon="video" />
    <SilkeShortcutButton label="Add shape" icon="shapes" />
    <SilkeShortcutButton label="Edit background" icon="square.dashed" />
  </SilkeBox>
</SilkeBox>
```

# Compressed version

```js
const [compressed, setCompressed] = React.useState(false);
const [compressedState, setCompressedState] = React.useState(compressed);
// On compressed prop change, do view transition to the new state
React.useEffect(() => {
  if (compressed) {
    document.startViewTransition(() => {
      setCompressedState(true);
    });
  } else {
    document.startViewTransition(() => {
      setCompressedState(false);
    });
  }
}, [compressed]);

<SilkeBox
  align="center"
  fill
  style={{ background: 'white', borderRadius: 'var(--border-radius-small)' }}
>
  <SilkeBox column={!compressedState} align="center" gap="xs" style={{ width: '220px' }}>
    <SilkeShortcutButton
      label="Add texts"
      icon="text"
      shortcut={['t']}
      compressed={compressedState}
    />
    <SilkeShortcutButton
      label="Add frames"
      icon="frame"
      shortcut={['f']}
      compressed={compressedState}
    />
    <SilkeShortcutButton
      label="Add images"
      icon="image"
      shortcut={['i']}
      compressed={compressedState}
    />
    <SilkeShortcutButton label="Add videos" icon="video" compressed={compressedState} />
    <SilkeShortcutButton label="Add shapes" icon="shapes" compressed={compressedState} />
    <SilkeShortcutButton
      label="Edit backgrounds"
      icon="square.dashed"
      compressed={compressedState}
    />
  </SilkeBox>

  <div style={{ position: 'absolute', bottom: 10, right: 10 }}>
    <SilkeButton label="Toggle compressed" onClick={() => setCompressed(!compressed)} />
  </div>
</SilkeBox>;
```

# Centered version

```js
<SilkeBox
  align="center"
  fill
  style={{ background: 'white', borderRadius: 'var(--border-radius-small)' }}
>
  <SilkeBox column align="center" gap="xs" style={{ width: '200px' }}>
    <SilkeShortcutButton label="Add text" icon="text" shortcut={['t']} centered />
  </SilkeBox>
</SilkeBox>
```
