CSS: number-input
.instui-number-input — Egy számbeviteli homlokzat +/- pörgetőoszloppal.
Forrás: number-input.ts
Akadálymentesség
Helyezze az elérhető nevet az <input> -ra (pl. aria-label), hogy a mező tulajdonosa legyen az értéknek; a +/- pörgetőgombok dekoratívak és az aria-hidden="true" -vel vannak megjelölve.
Használat
css
@import "@pantoken/components/components.css";
@import "@pantoken/components/number-input.css";Példák
html
<span class="instui-number-input">
<input id="qty" type="number" value="1" aria-label="Quantity">
<span class="arrows">
<button type="button" id="up" aria-hidden="true"></button>
<button class="down" type="button" id="down" aria-hidden="true"></button>
</span>
</span>Felépítés
text
.instui-number-input
input
.arrows
button
.downflowchart TD
n0[".instui-number-input"]:::cssdoc-root
n1("input"):::cssdoc-part
n2(".arrows"):::cssdoc-part
n3("button"):::cssdoc-part
n4(".down"):::cssdoc-part
n0 --> n1
n2 --> n3
n2 --> n4
n0 --> n2
classDef cssdoc-root stroke-width:1px;
classDef cssdoc-part stroke-width:1px;
classDef cssdoc-slot stroke-width:1px;
classDef cssdoc-component stroke-width:1px;
Módosítók
| Módosító | Leírás |
|---|---|
.-disabled | Letiltott állapot. |
.-invalid | Érvénytelen (hiba) állapot. |
.-readonly | Csak olvasható állapot. |
.-size-large | Nagy. Hosszú forma alias a -size-lg. |
.-size-lg | Nagy. |
.-size-sm | Kicsi. |
.-size-small | Kicsi. Hosszú forma alias a -size-sm. |
.-success | Sikeres (érvényes) állapot. |
Részek
| Rész | Leírás |
|---|---|
.arrows | A +/- pörgető oszlop az inline vég helyen. |
.down | A csökkentés gombja; az osztályozatlan gomb növekszik. |
Pszeudoelemek
| Pszeudoelem | Leírás |
|---|---|
::before | A maszkolva chevron glyf minden pörgetőgombon: fel a növeléséhez, le az .down -n. |
::placeholder | A belső bemenet helyőrző szövege csillapított színben. |
Állapotok
| Állapot | Leírás |
|---|---|
:disabled | — |
Felhasznált tokenek
| Token | Típus | Érték |
|---|---|---|
--instui-color-icon-interactive-action-secondary-base | <color> | light-dark(#1D354F, #ffffff)LightDark |
--instui-component-text-input-arrows-background-active-color | <color> | light-dark(#B6CCEA, #2E5177)LightDark |
--instui-component-text-input-arrows-background-color | <color> | light-dark(#44709F, #86A8D5)LightDark |
--instui-component-text-input-arrows-background-disabled-color | <color> | light-dark(#DFE1E3, #334450)LightDark |
--instui-component-text-input-arrows-background-hover-color | <color> | light-dark(#44709F, #86A8D5)LightDark |
--instui-component-text-input-background-color | <color> | light-dark(#ffffff, #171B21)LightDark |
--instui-component-text-input-background-disabled-color | <color> | light-dark(#E8EAEC, #334450)LightDark |
--instui-component-text-input-background-hover-color | <color> | light-dark(#ffffff, #171B21)LightDark |
--instui-component-text-input-background-readonly-color | <color> | light-dark(#C7CACD, #6A7883)LightDark |
--instui-component-text-input-border-color | <color> | light-dark(#7E8792, #5F6E7A)LightDark |
--instui-component-text-input-border-disabled-color | <color> | light-dark(#C7CACD, #4A5B68)LightDark |
--instui-component-text-input-border-hover-color | <color> | light-dark(#334450, #7E8792)LightDark |
--instui-component-text-input-border-radius | <length> | 0.75rem |
--instui-component-text-input-border-readonly-color | <color> | #8D959F |
--instui-component-text-input-border-width | <length> | 0.0625rem |
--instui-component-text-input-error-border-color | <color> | light-dark(#CF1F24, #F56050)LightDark |
--instui-component-text-input-font-family | [ <font-family-name> | <generic-font-family> ]# | Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif |
--instui-component-text-input-font-size-lg | <length> | 1.25rem |
--instui-component-text-input-font-size-md | <length> | 1rem |
--instui-component-text-input-font-size-sm | <length> | 0.875rem |
--instui-component-text-input-gap-content | <length> | 0.75rem |
--instui-component-text-input-height-lg | <length> | 3rem |
--instui-component-text-input-height-md | <length> | 2.5rem |
--instui-component-text-input-height-sm | <length> | 2rem |
--instui-component-text-input-padding-horizontal-lg | <length> | 0.75rem |
--instui-component-text-input-padding-horizontal-md | <length> | 0.75rem |
--instui-component-text-input-padding-horizontal-sm | <length> | 0.5rem |
--instui-component-text-input-placeholder-color | <color> | light-dark(#5F6E7A, #7E8792)LightDark |
--instui-component-text-input-success-border-color | <color> | light-dark(#037D37, #3EA75B)LightDark |
--instui-component-text-input-text-color | <color> | light-dark(#273540, #ffffff)LightDark |
--instui-component-text-input-text-disabled-color | <color> | light-dark(#8D959F, #9EA6AD)LightDark |
--instui-component-text-input-text-readonly-color | <color> | light-dark(#273540, #ffffff)LightDark |
--instui-focus-outline-color | <color> | invert | — |
--instui-focus-outline-color-danger | <color> | invert | — |
--instui-focus-outline-color-success | <color> | invert | — |
--instui-focus-outline-offset | <length> | — |
--instui-focus-outline-radius | <length> | — |
--instui-focus-outline-style | auto | none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | — |
--instui-focus-outline-width | <length> | — |
--instui-icon-chevron-down | <image> | url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%209%206%206%206-6%22%2F%3E%3C%2Fsvg%3E') |
--instui-icon-chevron-up | <image> | url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m18%2015-6-6-6%206%22%2F%3E%3C%2Fsvg%3E') |
Kapcsolódó
- text-input — Ugyanezt az input homlokzat chromot osztja meg.
- range-input — Egy másik numerikus beviteli vezérlő.