{
  "id": "inline-sort-select",
  "name": "Inline Sort Select",
  "category": "forms",
  "tags": [
    "sort by",
    "select",
    "inline",
    "filter",
    "toolbar",
    "minimal"
  ],
  "description": "A borderless \"Sort by\" select that reads like part of the sentence, for product lists and search results.",
  "url": "https://copy-css.com/snippets/inline-sort-select",
  "markdown": "https://copy-css.com/snippets/inline-sort-select.md",
  "html": "<label class=\"sort-by\">\n  Sort by\n  <select name=\"sort\">\n    <option>Newest</option>\n    <option>Price: low to high</option>\n    <option>Price: high to low</option>\n    <option>Best rated</option>\n  </select>\n</label>",
  "css": ".sort-by {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  color: #71717a;\n  font: 14px system-ui, sans-serif;\n}\n\n.sort-by select {\n  padding: 4px 22px 4px 6px;\n  border: 0;\n  border-radius: 6px;\n  background: transparent url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318181b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\") no-repeat right 4px center / 12px;\n  color: #18181b;\n  font: 600 14px system-ui, sans-serif;\n  -webkit-appearance: none;\n  appearance: none;\n  field-sizing: content;\n  cursor: pointer;\n}\n\n.sort-by select:hover {\n  background-color: #f4f4f5;\n}\n\n.sort-by select:focus-visible {\n  outline: 2px solid #18181b;\n  outline-offset: 1px;\n}",
  "features": [
    "field-sizing",
    "Flexbox",
    "keyboard focus styles"
  ],
  "customProperties": []
}
