Skip to content

CSS: simple-select

.instui-simple-select — רכיב <select> מקומי מעוצב עם caret, שתואם למצבי ולגדלי שדה הטקסט.

עוטף <select> מקורי ופשוט ללא סימון תפריט/נפתח מותאם, כך שרינדור האפשרויות והתנהגות המקלדת של הדפדפן חלים כמות שהם; הוא משתף את עיצוב השדה שלו עם text-input.

Source: select.css

שימוש

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/simple-select.css";

דוגמאות

html
<select class="instui-simple-select">
  <option>Choose a fruit…</option>
  <option>Apple</option>
  <option>Orange</option>
  <option>Pear</option>
</select>

מבנה

text
.instui-simple-select
  option
flowchart TD n0[".instui-simple-select"]:::cssdoc-root n1("option"):::cssdoc-part n0 --> n1 classDef cssdoc-root stroke-width:1px; classDef cssdoc-part stroke-width:1px; classDef cssdoc-slot stroke-width:1px; classDef cssdoc-component stroke-width:1px;

מחליפים

מחליףתיאור
.-disabledמצב מושבת.
.-invalidמצב לא חוקי (שגיאה).
.-readonlyמצב קריאה בלבד.
.-size-largeגדול. שם מורחב של -size-lg.
.-size-lgגדול.
.-size-md(ברירת מחדל) בינוני.
.-size-medium(ברירת מחדל) בינוני. כינוי ארוך ל־-size-md.
.-size-smקטן.
.-size-smallקטן. שם מורחב של -size-sm.
.-successמצב הצלחה (תקין).

פיסואו־אלמנטים

פיסואו־אלמנטתיאור
::placeholderטקסט הממלא מקום (placeholder), בצבע עמום שמשתנה בהעברת הסמן.

מצבים

מצבתיאור
:disabled

אסימוני צריכה

Tokenסוגערך
--instui-component-text-input-background-color<color>LightDarklight-dark(#ffffff, #171B21)
--instui-component-text-input-background-disabled-color<color>LightDarklight-dark(#E8EAEC, #334450)
--instui-component-text-input-background-hover-color<color>LightDarklight-dark(#ffffff, #171B21)
--instui-component-text-input-background-readonly-color<color>LightDarklight-dark(#C7CACD, #6A7883)
--instui-component-text-input-border-color<color>LightDarklight-dark(#7E8792, #5F6E7A)
--instui-component-text-input-border-disabled-color<color>LightDarklight-dark(#C7CACD, #4A5B68)
--instui-component-text-input-border-hover-color<color>LightDarklight-dark(#334450, #7E8792)
--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>LightDarklight-dark(#CF1F24, #F56050)
--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-font-weight<integer>500
--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>LightDarklight-dark(#5F6E7A, #7E8792)
--instui-component-text-input-placeholder-hover-color<color>LightDarklight-dark(#334450, #9EA6AD)
--instui-component-text-input-success-border-color<color>LightDarklight-dark(#037D37, #3EA75B)
--instui-component-text-input-text-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-text-input-text-disabled-color<color>LightDarklight-dark(#8D959F, #9EA6AD)
--instui-component-text-input-text-readonly-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-focus-outline-color-dangerauto | <color>
--instui-focus-outline-color-successauto | <color>

קשור

  • text-input — משתף את אותו עיצוב שדה, מצבים וגדלים.
  • menu — משטח הנפתח שה-select העשיר יותר משתמש בו מחדש.