المكونات
أداة اختيار اللون
يختار لونًا ويرسله مع النموذج المحيط به.
الاستخدام
أساسي
HTML
<bs:bsui-color-picker defaultValue="#7c3aed" />حقل ذو تسمية
عينة لون، وحقل رموز سداسية، ونص إرشادي يوضح موضع تطبيق اللون.
HTML
<bs:bsui-field>
<bs:bsui-field-label text="Accent color" />
<bs:bsui-color-picker name="accent" defaultValue="#0ea5e9" />
<bs:bsui-field-description text="Used for buttons, links and focus rings." />
</bs:bsui-field>لوحة ألوان العلامة التجارية
عدة أدوات اختيار متجاورة، ترسل كل منها قيمتها.
HTML
<bs:bsui-stack direction="row" gap="4" align="start">
<bs:bsui-field>
<bs:bsui-field-label text="Primary" />
<bs:bsui-color-picker name="primary" defaultValue="#111827" />
</bs:bsui-field>
<bs:bsui-field>
<bs:bsui-field-label text="Accent" />
<bs:bsui-color-picker name="accent" defaultValue="#f59e0b" />
</bs:bsui-field>
</bs:bsui-stack>معطل
كل من عينة اللون الأصلية وحقل الرموز السداسية معطل.
HTML
<bs:bsui-color-picker defaultValue="#64748b" disabled="true" />السمات
| السمة | النوع | افتراضي |
|---|---|---|
name | text | — |
defaultValue | text | #000000 |
disabled | toggle | false |
nameAlt | text | — |
onChange | text | — |
value | text | — |