Skip to content
View Markdown

Zoomable and Selectable ​

Content roles for a zoomable region or selectable text.

tsx
import { Selectable, Zoomable, Image } from '@satinhq/kit'

Example ​

Full example
tsx
import { Image, List, Screen, Section, Selectable, Zoomable } from '@satinhq/kit'

function Example() {
  return (
    <Screen>
      <List id="content">
        <Section>
          <Selectable>
            <p>Meeting point: Kyoto Station, north entrance.</p>
          </Selectable>
          <Zoomable aria-label="Preview icon">
            <Image src="/preview/icon.svg" alt="Satin preview icon" width={180} height={180} />
          </Zoomable>
        </Section>
      </List>
    </Screen>
  )
}

Allow text selection ​

Wrap readable text in Selectable. Text inputs own their editing behavior separately.

Own a zoom region ​

Zoomable owns pinch zoom for its children. maxScale bounds the scale, and onScaleChange reports it. Try touch gestures in the installed app.

API ​

Scroll horizontally to read every column.

PropTypeDescription
childrenReactNodeThe owned content.
maxScalenumberMaximum zoom scale.
onScaleChange(scale: number) => voidReceives scale changes.

Related: Quick start, List, Screen.

:::

Satin runs on the Lumen rendering engine and is open source under the MIT License.