Glass
JS behaviour
Reading glass
A lens over live content: drag it, throw it or move it with the arrow keys — the text under it stays selectable and the buttons clickable.
Real scenarios
The component as it is used in a product — not a specimen grid.
Subscription terms, the honest version
Drop the lens on the paragraph and read the small parts magnified — this sentence stays selectable under the glass.
Billing recurs monthly and cancels any time up to twenty-four hours before renewal; refunds are full and unquestioned. Figures render in your locale’s digits, with value-added tax computed separately. Should any service stay down longer than ninety-six hours, that month is credited automatically.
clickable under the lens
The invoice’s fine print
Order #1042 · paid in 3 instalments · 426,666 tomans each
Processing fee: 9,600 tomans · insurance included
Ships from the Istanbul depot · weight 1.2kg
Returns accepted until Nov 5 · no questions asked
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| size / shape | int · string | 144 · circle | The lens diameter in px and its shape: circle · pill · rounded. |
| x / y | float | 0.5 · 0.5 | The lens’ starting spot as a fraction of the container (0 to 1). |
| label | string | «ذرهبین» | The lens button’s accessible label. |
Snippet
<x-nx::reading-glass :x="0.5" :y="0.35" size="160" shape="pill">
…متن درشت یا جزئیات تصویر…
</x-nx::reading-glass>