/Knowledge/sources/honojs__hono/llms-full/client-components-startviewtransition-family-a-very-simple-example--part-02--2b1102947bbd.md
Client Components: startViewTransition() family > A very simple examp...
Client Components: startViewTransition() family A very simple example (part 02) Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https...
Client Components: startViewTransition() family > A very simple example (part 02)
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#1-a-very-simple-example
Summary
## Content
```tsx
import { useState, startViewTransition } from 'hono/jsx'
import { css, Style } from 'hono/css'
export default function App() {
const [showLargeImage, setShowLargeImage] = useState(false)
return (
<>
<Style />
<button
onClick={() =>
startViewTransition(() =>
setShowLargeImage((state) => !state)
)
}
>
Click!
</button>
<div>
{!showLargeImage ? (
<img src='https://hono.dev/images/logo.png' />
) : (
<div
class={css`
background: url('https://hono.dev/images/logo-large.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 600px;
height: 600px;
`}
></div>
)}
</div>
</>
)
}
Metadata
{
"chunk_index": 1,
"citation": "https://hono.dev/llms-full.txt#1-a-very-simple-example",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Client Components > `startViewTransition()` family > 1. A very simple example (2)",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 93,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Client Components: startViewTransition() family > A very simple example (part 02)",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}