Skip to content
UI Kit
Accent color

Optician website sections

For opticians. Drawn frames filtered by face and shape, a drawn try-on, eye test booking with an acuity chart, lens options with a drawn edge and a contact lens subscription.

5 variants
Switch category

From the frame to the right lens

Choosing glasses is personal and a little technical. These sections make both parts easy, with frames by face shape, a drawn try on, the eye test booking and lens options that show what a higher index does to the edge. Contact lens wearers get a subscription with their values per eye.

Frames filters by face shape, frame shape and material, each colour swatch recolours its frame and saved frames count up for a try on. Try on puts the chosen frame on a drawn face with a note on how well it suits. Eye test reveals an acuity chart row by row and books the kind of appointment, a day and a time. Lens options lets the drawn lens edge get thicker or thinner with every index, marks the best one and adds coatings to the price for the pair. Contact lenses sets the values per eye with steppers, toric lenses add cylinder and axis, longer intervals save.

Link the eye test from every frame, most buyers need fresh values first. Show lens thickness as a picture, it explains a price difference better than any table. Have the saved frames ready in the store as a short list for the appointment.

Optician

FramesNew in 1.2

Filter by face shape, frame shape and material. Drawn frames rise in one after another and tilt on hover, each colour swatch recolours its frame. Saved frames count up for a try-on.

Try onNew in 1.2

A drawn face wears the chosen frame. Switch the face shape, the frame and its colour, the frame slides on each time and a note says how well it suits.

Eye testNew in 1.2

An acuity chart reveals row by row while scrolling. Pick the kind of appointment, a day and a time, the form names every missing field and confirms with a date.

Lens optionsNew in 1.2

Pick the kind of lens, drag to your prescription and the drawn lens edge thickens or thins with every index. The best index is marked, coatings tick with a pop, the price for the pair glides along.

Contact lensesNew in 1.2

Pick the kind of lens and set the values per eye with steppers, toric lenses add cylinder and axis. Drawn boxes print the values and tilt in, the price per delivery glides and longer intervals save.

Details

What Optician brings along, read from the registry and the source.

Variants
5
Version
1.0.0 · since 1.2.0
File
components/ui/optician.tsx
Brings along
utilskitbuttoniconsectionmotioninput
npm packages
None
Languages
English and German, 78 texts of its own
Studio
Adjust in code

Props

The OpticianProps interface from components/ui/optician.tsx, with the comments from the code.

  • variantoptional
    OpticianVariant

    framestry-oneye-testlens-optionscontact-lenses

  • eyebrowoptional
    React.ReactNode
  • titleoptional
    React.ReactNode
  • descriptionoptional
    React.ReactNode
  • framesoptional
    OpticianFrame[]

    frames, try-on

  • tryOnHrefoptional
    string

    frames: link of the try on button

  • testsoptional
    OpticianEyeTest[]

    eye-test

  • slotsoptional
    { date: string; times: string[] }[]
  • factsoptional
    { label: string; icon?: IconName }[]

    eye-test: facts next to the chart

  • onBookoptional
    (data: { test: string; date: string; time: string; name: string; phone: string; wearer: boolean }) => void
  • lensTypesoptional
    OpticianLensType[]

    lens-options

  • indexesoptional
    OpticianLensIndex[]
  • coatingsoptional
    OpticianCoating[]
  • chooseHrefoptional
    string

    lens-options: link of the choose button

  • poweroptional
    number

    lens-options: start value of the prescription in dioptres

  • contactLensesoptional
    OpticianContactLens[]

    contact-lenses

  • intervalsoptional
    { months: number; discount?: number }[]

    contact-lenses: delivery intervals in months with a discount in percent

  • onSubscribeoptional
    (data: { lens: string; months: number; right: EyeValues; left: EyeValues }) => void
  • currencyoptional
    string

Built-in texts

Optician writes these texts itself. The language follows the KitProvider, the labels prop replaces single ones.

Show all 78 texts
faceEnglish Face shapeGerman Gesichtsform
shapeEnglish Frame shapeGerman Fassungsform
materialEnglish MaterialGerman Material
allEnglish AllGerman Alle
ovalEnglish OvalGerman Oval
roundEnglish RoundGerman Rund
squareEnglish SquareGerman Eckig
heartEnglish HeartGerman Herz
rectangleEnglish RectangleGerman Rechteckig
cat-eyeEnglish Cat eyeGerman Cat-Eye
aviatorEnglish AviatorGerman Pilot
pantoEnglish PantoGerman Panto
acetateEnglish AcetateGerman Acetat
metalEnglish MetalGerman Metall
titaniumEnglish TitaniumGerman Titan
colorEnglish Colour of {name}German Farbe von {name}
mmEnglish {n} mmGerman {n} mm
rememberEnglish Save {name} for a try-onGerman {name} zur Anprobe vormerken
savedEnglish SavedGerman Vorgemerkt
saveEnglish SaveGerman Vormerken
savedNEnglish {n} frames saved for a try-onGerman {n} Fassungen zur Anprobe vorgemerkt
savedNoneEnglish Save frames you like, we have them ready when you visit.German Merk dir Fassungen vor, wir legen sie zu deinem Besuch bereit.
bookTryEnglish Book a try-onGerman Anprobetermin buchen
noFramesEnglish No frame fits this filter yet. Show all to see more.German Zu diesem Filter passt noch keine Fassung. Zeig alle, um mehr zu sehen.
showAllEnglish Show all framesGerman Alle Fassungen zeigen
suitsEnglish A great match for this face shapeGerman Passt sehr gut zu dieser Gesichtsform
alsoTryEnglish A bold contrast, worth a try in storeGerman Ein mutiger Kontrast, probier sie im Laden
frameEnglish FrameGerman Fassung
tryInStoreEnglish Try {name} in storeGerman {name} im Laden anprobieren
testsEnglish Kind of appointmentGerman Art des Termins
freeEnglish FreeGerman Kostenlos
minEnglish {n} minGerman {n} Min.
dateEnglish DateGerman Datum
timeEnglish TimeGerman Uhrzeit
nameEnglish NameGerman Name
phoneEnglish PhoneGerman Telefon
glassesEnglish I already wear glasses or contact lensesGerman Ich trage schon eine Brille oder Kontaktlinsen
bookEnglish Book the appointmentGerman Termin buchen
bookedEnglish Booked for {date} at {time}. Your confirmation is on its way.German Gebucht für {date} um {time} Uhr. Die Bestätigung ist unterwegs.
againEnglish Book another appointmentGerman Weiteren Termin buchen
errNameEnglish Please enter your name.German Bitte gib deinen Namen an.
errPhoneEnglish Please enter a phone number so we can reach you.German Bitte gib eine Telefonnummer an, damit wir dich erreichen.
errTimeEnglish Please pick a time.German Bitte wähle eine Uhrzeit.
acuityEnglish Visual acuityGerman Sehschärfe
lensTypeEnglish Kind of lensGerman Glasart
strengthEnglish Your prescriptionGerman Deine Stärke
strengthHintEnglish Drag to your value, the drawing shows the lens edge.German Auf deinen Wert ziehen, die Zeichnung zeigt den Glasrand.
indexEnglish Lens thicknessGerman Glasdicke
thinnerEnglish {n}% thinner than standardGerman {n} % dünner als Standard
standardEnglish StandardGerman Standard
recommendedEnglish RecommendedGerman Empfohlen
edgeEnglish EdgeGerman Rand
centreEnglish CentreGerman Mitte
coatingsEnglish CoatingsGerman Veredelungen
includedEnglish IncludedGerman Inklusive
pairEnglish Your lenses for the pairGerman Deine Gläser für das Paar
chooseEnglish Choose these lensesGerman Diese Gläser wählen
finalNoteEnglish We decide on the final lenses together after the eye test.German Die endgültigen Gläser legen wir nach dem Sehtest gemeinsam fest.
lensKindEnglish Contact lensesGerman Kontaktlinsen
rightEnglish Right eyeGerman Rechtes Auge
leftEnglish Left eyeGerman Linkes Auge
sameEnglish Same values for both eyesGerman Gleiche Werte für beide Augen
sphEnglish SphereGerman Sphäre
cylEnglish CylinderGerman Zylinder
axisEnglish AxisGerman Achse
lessEnglish Lower {k}German {k} senken
moreEnglish Raise {k}German {k} erhöhen
everyEnglish DeliveryGerman Lieferung
everyNEnglish Every {n} monthsGerman Alle {n} Monate
everyOneEnglish Every monthGerman Jeden Monat
save2English save {n}German {n} sparen
boxesEnglish {n} boxesGerman {n} Packungen
perDeliveryEnglish Per deliveryGerman Je Lieferung
perMonthEnglish That is {price} a monthGerman Das sind {price} im Monat
subscribeEnglish Start the subscriptionGerman Abo starten
subscribedEnglish Subscribed. We check your values before the first delivery.German Abo gestartet. Wir prüfen deine Werte vor der ersten Lieferung.
lensNoteEnglish Enter the values from your contact lens pass. We check them before the first delivery.German Trag die Werte aus deinem Kontaktlinsenpass ein. Wir prüfen sie vor der ersten Lieferung.
pauseEnglish Pause or cancel at any timeGerman Jederzeit pausieren oder kündigen

Accessibility

Read from the source of the component.

  • Optician handles the keys Arrow up, Arrow down, Arrow left, Arrow right and Space itself.
  • Sets aria-checked, aria-label, aria-live, aria-pressed and aria-valuetext, so screen readers announce purpose and state.
  • Uses the roles alert, group, radio, radiogroup and status.
  • Announces changes through a live region without moving focus.
  • Every field has a label, visible or for screen readers.
  • Adds text for screen readers where icons and graphics stand alone.
  • Shows a visible focus ring when used with the keyboard.
  • The server renders the starting state in full, JavaScript only adds the interaction.

Motion

  • Brings animations of its own, calmly timed and without wobble.
  • With reduced motion (prefers-reduced-motion) it stays still. 8 places in the code switch motion off then.

Frequent questions

How do I install Optician?

With aiw add @ai-website/optician. The command puts components/ui/optician.tsx into your project, the code is yours from then on. It brings along button, icon, section, motion and input. It needs no further npm packages.

Which variants does Optician have?

5 variants, Frames, Try on, Eye test, Lens options and Contact lenses. You pick one with the variant prop, for example variant="try-on".

Can I translate the texts of Optician?

Yes. Optician carries 78 texts of its own in English and German, such as “Face shape”, “Frame shape” and “Material”. The language follows the KitProvider, single texts change through the labels prop.

Can an AI assistant build with Optician?

Yes. Through the MCP server of the aiw CLI, Claude, Cursor, GitHub Copilot, Windsurf, Codex and Gemini find Optician with aiw_components and install it with aiw_add @ai-website/optician. Name the variant in your prompt, for example variant="frames", and the assistant writes your content straight into the props.

Often searched

Jump to

Copied to the clipboard