feega

free UI sections and components / app UI

settings form

By Andrea Buttarelli, founder of Feega · Free · Svelte, React, Vue, Astro, HTML

Grouped settings: profile fields, a preference select and a toggle.

formsettings

code

SettingsForm.svelte
<section class="fl-settings-form">
  <form method="post" action="#">
    <header class="head">
      <h1>Profile</h1>
      <p>How other people see you across the workspace.</p>
    </header>
    <div class="row">
      <div class="label"><b>Photo</b><span>Square, at least 256 px.</span></div>
      <div class="control photo"><span class="fl-avatar" aria-hidden="true">NS</span><button class="fl-btn fl-btn--sm" type="button">Upload</button><button class="fl-btn fl-btn--sm fl-btn--ghost" type="button">Remove</button></div>
    </div>
    <div class="row">
      <label class="label" for="fl-settings-name"><b>Name</b><span>Your full name.</span></label>
      <div class="control"><input class="fl-input" id="fl-settings-name" name="name" value="Name Surname" autocomplete="name" /></div>
    </div>
    <div class="row">
      <label class="label" for="fl-settings-email"><b>Email</b><span>Used to log in.</span></label>
      <div class="control"><input class="fl-input" id="fl-settings-email" type="email" name="email" value="name@example.com" autocomplete="email" /><span class="fl-badge fl-badge--success">Verified</span></div>
    </div>
    <div class="row">
      <label class="label" for="fl-settings-bio"><b>Bio</b><span>A line or two. Shown on your profile.</span></label>
      <div class="control"><textarea class="fl-input" id="fl-settings-bio" name="bio" rows="3" maxlength="160" placeholder="What you work on"></textarea></div>
    </div>
    <div class="row">
      <div class="label"><b>Email me</b><span>You can change this anytime.</span></div>
      <div class="control toggles">
        <label><input class="fl-switch" type="checkbox" role="switch" name="updates" checked />Product updates</label>
        <label><input class="fl-switch" type="checkbox" role="switch" name="digest" />Weekly digest</label>
      </div>
    </div>
    <footer class="actions">
      <button class="fl-btn fl-btn--sm fl-btn--ghost" type="reset">Cancel</button>
      <button class="fl-btn fl-btn--sm fl-btn--ink" type="submit">Save changes</button>
    </footer>
  </form>
</section>

<style>
.fl-settings-form{font-family:var(--feega-font);font-size:var(--feega-text-body);line-height:1.5;letter-spacing:var(--feega-tracking);color:var(--feega-fg);background:var(--feega-bg);-webkit-font-smoothing:antialiased}
:where(.fl-settings-form) *,:where(.fl-settings-form) *::before,:where(.fl-settings-form) *::after{box-sizing:border-box}
:where(.fl-settings-form) :is(h1,h2,h3,h4,p,ul,ol,figure,blockquote,dl,dd){margin:0}
:where(.fl-settings-form) a{color:inherit;text-decoration:none}
:where(.fl-settings-form) :focus-visible{outline:2px solid var(--feega-focus);outline-offset:3px}
.fl-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--feega-space-2);min-height:44px;padding:0 var(--feega-space-6);border:1px solid var(--feega-line-strong);border-radius:var(--feega-radius-full);background:transparent;color:var(--feega-fg);font:inherit;font-size:0.9375rem;font-weight:500;letter-spacing:var(--feega-tracking);white-space:nowrap;text-decoration:none;cursor:pointer;transition:background-color var(--feega-dur-fast) var(--feega-ease),border-color var(--feega-dur-fast) var(--feega-ease),color var(--feega-dur-fast) var(--feega-ease),transform var(--feega-dur-fast) var(--feega-ease)}
.fl-btn:hover{border-color:var(--feega-fg-subtle);background:var(--feega-surface)}
.fl-btn:active{transform:scale(0.97)}
.fl-btn--primary{border-color:var(--feega-accent);background:var(--feega-accent);color:var(--feega-accent-fg)}
.fl-btn--primary:hover{border-color:var(--feega-accent-hover);background:var(--feega-accent-hover)}
.fl-btn--ink{border-color:var(--feega-fg);background:var(--feega-fg);color:var(--feega-bg)}
.fl-btn--ink:hover{border-color:var(--feega-fg-muted);background:var(--feega-fg-muted)}
.fl-btn--ghost{border-color:transparent}
.fl-btn--sm{min-height:36px;padding:0 var(--feega-space-4);font-size:var(--feega-text-sm)}
.fl-btn .fl-px{width:10px;transition:transform var(--feega-dur) var(--feega-ease)}
.fl-btn:hover .fl-px{transform:translateX(3px)}
.fl-btn[disabled]{opacity:0.45;cursor:not-allowed}
.fl-field{display:grid;gap:var(--feega-space-2);font-size:var(--feega-text-sm);font-weight:500}
.fl-input{width:100%;min-height:44px;padding:0 var(--feega-space-4);border:1px solid var(--feega-line);border-radius:var(--feega-radius-md);background:var(--feega-input);color:var(--feega-fg);font:inherit;font-size:var(--feega-text-body);font-weight:400;letter-spacing:var(--feega-tracking);transition:border-color var(--feega-dur-fast) var(--feega-ease),box-shadow var(--feega-dur-fast) var(--feega-ease)}
.fl-input::placeholder{color:var(--feega-fg-subtle)}
.fl-input:hover{border-color:var(--feega-line-strong)}
.fl-input:focus{outline:none;border-color:var(--feega-accent);box-shadow:0 0 0 4px var(--feega-accent-soft)}
.fl-switch{appearance:none;position:relative;flex:none;width:40px;height:24px;margin:0;border-radius:var(--feega-radius-full);background:var(--feega-line-strong);cursor:pointer;transition:background-color var(--feega-dur) var(--feega-ease)}
.fl-switch::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:var(--feega-radius-full);background:var(--feega-raised);box-shadow:var(--feega-shadow);transition:transform var(--feega-dur) var(--feega-ease)}
.fl-switch:checked{background:var(--feega-accent)}
.fl-switch:checked::after{transform:translateX(16px)}
.fl-avatar{display:inline-grid;flex:none;place-items:center;width:32px;height:32px;border-radius:var(--feega-radius-full);background:var(--feega-surface);color:var(--feega-fg-muted);font-size:var(--feega-text-xs);font-weight:600;letter-spacing:0}
.fl-badge{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 10px;border-radius:var(--feega-radius-full);background:var(--feega-surface);color:var(--feega-fg-muted);font-size:var(--feega-text-xs);font-weight:500;letter-spacing:0;white-space:nowrap}
.fl-badge::before{content:"";width:6px;height:6px;border-radius:var(--feega-radius-full);background:currentColor}
.fl-badge--accent{background:var(--feega-accent-soft);color:var(--feega-accent-text)}
.fl-badge--success{background:var(--feega-success-soft);color:var(--feega-success)}
.fl-badge--danger{background:var(--feega-danger-soft);color:var(--feega-danger)}
.fl-settings-form{padding:clamp(1.5rem,5vw,4rem) var(--feega-gutter)}
.fl-settings-form form{max-width:48rem;margin-inline:auto}
.fl-settings-form .head{display:grid;gap:var(--feega-space-2);padding-bottom:var(--feega-space-8)}
.fl-settings-form h1{font-family:var(--feega-font-display);font-size:clamp(2.5rem,5vw,3.5rem);font-weight:600;line-height:0.95;letter-spacing:-0.05em}
.fl-settings-form .head p{color:var(--feega-fg-muted)}
.fl-settings-form .row{display:grid;grid-template-columns:minmax(0,15rem) minmax(0,1fr);gap:var(--feega-space-4) var(--feega-space-8);padding-block:var(--feega-space-6);border-top:1px solid var(--feega-line)}
.fl-settings-form .label{display:grid;align-content:start;gap:2px;font-size:var(--feega-text-sm)}
.fl-settings-form .label b{font-weight:500}
.fl-settings-form .label span{color:var(--feega-fg-muted)}
.fl-settings-form .control{display:flex;flex-wrap:wrap;align-items:center;gap:var(--feega-space-3)}
.fl-settings-form .control .fl-input{flex:1 1 14rem}
.fl-settings-form textarea.fl-input{min-height:96px;padding-block:12px;resize:vertical}
.fl-settings-form .photo .fl-avatar{width:56px;height:56px;font-size:var(--feega-text-sm)}
.fl-settings-form .toggles{display:grid;gap:var(--feega-space-4)}
.fl-settings-form .toggles label{display:flex;align-items:center;gap:var(--feega-space-3);font-size:var(--feega-text-sm);font-weight:500;cursor:pointer}
.fl-settings-form .actions{display:flex;justify-content:flex-end;gap:var(--feega-space-2);padding-top:var(--feega-space-6);border-top:1px solid var(--feega-line)}
@media (max-width:640px){.fl-settings-form .row{grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){:where([class^="fl-"]) *,:where([class^="fl-"]) *::before,:where([class^="fl-"]) *::after{animation:none!important;transition:none!important}}
</style>
tokens.css, the shared file every template reads
tokens.cssopen file
:root,
[data-theme="light"] {
  color-scheme: light;
  --feega-bg: #f7f6f2;
  --feega-surface: #efede7;
  --feega-raised: #ffffff;
  --feega-input: #ffffff;
  --feega-fg: #121212;
  --feega-fg-muted: #5c5a55;
  --feega-fg-subtle: #6d6a63;
  --feega-line: #e2dfd7;
  --feega-line-strong: #cdc9bf;
  --feega-dot: #d3cfc5;
  --feega-accent: #ff4f00;
  --feega-accent-hover: #ff6a26;
  --feega-accent-fg: #121212;
  --feega-accent-soft: #ffe8dc;
  --feega-accent-text: #b83800;
  --feega-danger: #c0231a;
  --feega-danger-fg: #ffffff;
  --feega-danger-soft: #fde6e3;
  --feega-success: #12703a;
  --feega-success-soft: #e0f3e6;
  --feega-focus: #ff4f00;
  --feega-overlay: rgb(18 18 18 / 0.4);
  --feega-shadow: 0 1px 2px rgb(18 18 18 / 0.05), 0 8px 24px -8px rgb(18 18 18 / 0.12);
  --feega-shadow-float: 0 2px 4px rgb(18 18 18 / 0.06), 0 24px 48px -12px rgb(18 18 18 / 0.22);
  --feega-radius-xs: 2px;
  --feega-radius-sm: 6px;
  --feega-radius-md: 10px;
  --feega-radius-lg: 16px;
  --feega-radius-full: 999px;
  --feega-font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --feega-font-display: var(--feega-font);
  --feega-font-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --feega-tracking: -0.02em;
  --feega-tracking-tight: -0.05em;
  --feega-text-xs: 0.75rem;
  --feega-text-sm: 0.875rem;
  --feega-text-body: 1rem;
  --feega-text-lg: clamp(1.0625rem, 1.6vw, 1.25rem);
  --feega-text-xl: 1.5rem;
  --feega-text-title: clamp(2.5rem, 6vw, 4.5rem);
  --feega-text-display: clamp(3rem, 9.5vw, 7rem);
  --feega-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --feega-dur-fast: 160ms;
  --feega-dur: 420ms;
  --feega-space-1: 0.25rem;
  --feega-space-2: 0.5rem;
  --feega-space-3: 0.75rem;
  --feega-space-4: 1rem;
  --feega-space-6: 1.5rem;
  --feega-space-8: 2rem;
  --feega-space-12: 3rem;
  --feega-space-16: 4rem;
  --feega-space-section: clamp(4.5rem, 11vw, 9rem);
  --feega-gutter: clamp(1rem, 4vw, 2rem);
  --feega-max-width: 76rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --feega-bg: #050505;
    --feega-surface: #121212;
    --feega-raised: #1a1a1a;
    --feega-input: #0d0d0d;
    --feega-fg: #f0eee9;
    --feega-fg-muted: #a3a09a;
    --feega-fg-subtle: #8a877f;
    --feega-line: #232323;
    --feega-line-strong: #363636;
    --feega-dot: #2c2c2c;
    --feega-accent: #ff5a14;
    --feega-accent-hover: #ff7333;
    --feega-accent-fg: #121212;
    --feega-accent-soft: #2b1206;
    --feega-accent-text: #ff7a3d;
    --feega-danger: #ff6b5e;
    --feega-danger-fg: #121212;
    --feega-danger-soft: #2e0f0c;
    --feega-success: #4cc47a;
    --feega-success-soft: #0d2617;
    --feega-focus: #ff5a14;
    --feega-overlay: rgb(0 0 0 / 0.7);
    --feega-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --feega-shadow-float: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -12px rgb(0 0 0 / 0.8);
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --feega-bg: #050505;
  --feega-surface: #121212;
  --feega-raised: #1a1a1a;
  --feega-input: #0d0d0d;
  --feega-fg: #f0eee9;
  --feega-fg-muted: #a3a09a;
  --feega-fg-subtle: #8a877f;
  --feega-line: #232323;
  --feega-line-strong: #363636;
  --feega-dot: #2c2c2c;
  --feega-accent: #ff5a14;
  --feega-accent-hover: #ff7333;
  --feega-accent-fg: #121212;
  --feega-accent-soft: #2b1206;
  --feega-accent-text: #ff7a3d;
  --feega-danger: #ff6b5e;
  --feega-danger-fg: #121212;
  --feega-danger-soft: #2e0f0c;
  --feega-success: #4cc47a;
  --feega-success-soft: #0d2617;
  --feega-focus: #ff5a14;
  --feega-overlay: rgb(0 0 0 / 0.7);
  --feega-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  --feega-shadow-float: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -12px rgb(0 0 0 / 0.8);
}

what it is

Settings form is a free app UI piece. Grouped settings: profile fields, a preference select and a toggle. It is tagged form and settings.

It is markup and CSS only, with no script in any version.

Size per version: Svelte 1 file, 89 lines; React 2 files, 93 lines; Vue 1 file, 91 lines; Astro 1 file, 92 lines; HTML 2 files, 87 lines.

tokens this template reads

TokenControlsUses
--feega-easethe animation curve9
--feega-dur-fastthe short animation duration6
--feega-fg-mutedsecondary text6
--feega-radius-fullfully round pills and buttons6
--feega-fgmain text5
--feega-text-smsmall text size5
--feega-accentthe brand colour on primary actions4
--feega-space-2spacing step 24
--feega-space-4spacing step 44
--feega-durthe animation duration3
--feega-linehairline borders and dividers3
--feega-line-strongstronger borders3

To restyle it, set any of these custom properties on :root, or on an ancestor of the template to change it in one place only. For example, --feega-accent changes the brand colour in light and dark alike. Add the shared tokens.css once per project.

fonts

It uses Inter Tight (400, 500, 600) from Google Fonts. Without them the font tokens fall back to a system stack.

head
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap" />

insert with Feega

Open Add, then Library, and click Insert or drag it into your running app. Feega writes the component, tokens and fonts for your framework. One undo. how it works

Free VS Code extension. No account, no AI.

get feega →

related templates