Buttons

1 component in this section

Primary Button

Default primary button element

<button type="button" class="dg-btn dg-btn--primary">Primary Action</button>
import { Btn } from '@deepgram/styles/react';

<Btn primary type="button">Primary Action</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn primary type="button">Primary Action</dg-btn>

Primary Button with Icon Before

Icon placed before text

<button type="button" class="dg-btn dg-btn--primary">
  <i class="fas fa-play"></i>
  Start Recording
</button>
import { Btn } from '@deepgram/styles/react';

<Btn primary type="button">
  <i className="fas fa-play" />
  Start Recording
</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn primary type="button">
  <i class="fas fa-play"></i>
  Start Recording
</dg-btn>

Small Primary Button

Compact version for tight spaces

<button type="button" class="dg-btn dg-btn--primary dg-btn--sm">Primary</button>
import { Btn } from '@deepgram/styles/react';

<Btn primary sm type="button">Save</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn primary sm type="button">Primary</dg-btn>

Custom Color Primary Button

Primary button with custom brand colors using CSS variables

<div style="--dg-primary: #a855f7; --dg-secondary: #ec4899;">
  <button type="button" class="dg-btn dg-btn--primary">
    <i class="fas fa-sparkles"></i>
    Custom Purple Brand
  </button>
</div>
import { Btn } from '@deepgram/styles/react';

<div style={{ '--dg-primary': '#a855f7', '--dg-secondary': '#ec4899' }}>
  <Btn primary type="button">
    <i className="fas fa-sparkles" />
    Custom Purple Brand
  </Btn>
</div>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<div style="--dg-primary: #a855f7; --dg-secondary: #ec4899;">
  <dg-btn primary type="button">
    <i class="fas fa-sparkles"></i>
    Custom Purple Brand
  </dg-btn>
</div>

Small Button

Small Primary Button

Compact primary button for tight spaces

<button type="button" class="dg-btn dg-btn--primary dg-btn--sm">Save</button>
import { Btn } from '@deepgram/styles/react';

<Btn primary sm type="button">Save</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn primary sm type="button">Save</dg-btn>

Small Secondary Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--secondary dg-btn--sm">Cancel</button>
import { Btn } from '@deepgram/styles/react';

<Btn secondary sm type="button">Cancel</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn secondary sm type="button">Cancel</dg-btn>

Small Ghost Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--ghost dg-btn--sm">Close</button>
import { Btn } from '@deepgram/styles/react';

<Btn ghost sm type="button">Close</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn ghost sm type="button">Close</dg-btn>

Secondary Button

Secondary Button

Default secondary button element

<button type="button" class="dg-btn dg-btn--secondary">Secondary Action</button>
import { Btn } from '@deepgram/styles/react';

<Btn secondary type="button">Secondary Action</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn secondary type="button">Secondary Action</dg-btn>

Secondary Button with Icon Before

Icon placed before text

<button type="button" class="dg-btn dg-btn--secondary">
  <i class="fas fa-download"></i>
  Download
</button>
import { Btn } from '@deepgram/styles/react';

<Btn secondary type="button">
  <i className="fas fa-download" />
  Download
</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn secondary type="button">
  <i class="fas fa-download"></i>
  Download
</dg-btn>

Small Secondary Button

Compact version for tight spaces

<button type="button" class="dg-btn dg-btn--secondary dg-btn--sm">Cancel</button>
import { Btn } from '@deepgram/styles/react';

<Btn secondary sm type="button">Cancel</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn secondary sm type="button">Cancel</dg-btn>

Ghost Button

Ghost Button

Default ghost button element

<button type="button" class="dg-btn dg-btn--ghost">Ghost Action</button>
import { Btn } from '@deepgram/styles/react';

<Btn ghost type="button">Ghost Action</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn ghost type="button">Ghost Action</dg-btn>

Ghost Button with Icon Before

Icon placed before text

<button type="button" class="dg-btn dg-btn--ghost">
  <i class="fas fa-cog"></i>
  Settings
</button>
import { Btn } from '@deepgram/styles/react';

<Btn ghost type="button">
  <i className="fas fa-cog" />
  Settings
</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn ghost type="button">
  <i class="fas fa-cog"></i>
  Settings
</dg-btn>

Small Ghost Button

Compact version for tight spaces

<button type="button" class="dg-btn dg-btn--ghost dg-btn--sm">Close</button>
import { Btn } from '@deepgram/styles/react';

<Btn ghost sm type="button">Close</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn ghost sm type="button">Close</dg-btn>

Danger Ghost Button

Danger Ghost Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--danger-ghost">Delete</button>
import { Btn } from '@deepgram/styles/react';

<Btn dangerGhost type="button">Delete</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn danger-ghost type="button">Delete</dg-btn>

Danger Ghost Button with Icon

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--danger-ghost">
  <i class="fas fa-trash"></i>
  Delete Recording
</button>
import { Btn } from '@deepgram/styles/react';

<Btn dangerGhost type="button">
  <i className="fas fa-trash" />
  Delete Recording
</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn danger-ghost type="button">
  <i class="fas fa-trash"></i>
  Delete Recording
</dg-btn>

Small Danger Ghost Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--danger-ghost dg-btn--sm">Remove</button>
import { Btn } from '@deepgram/styles/react';

<Btn dangerGhost sm type="button">Remove</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn danger-ghost sm type="button">Remove</dg-btn>

Icon Button

Icon Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--primary dg-btn--icon-only">
  <i class="fas fa-microphone"></i>
</button>
import { Btn } from '@deepgram/styles/react';

<Btn primary iconOnly type="button">
  <i className="fas fa-microphone" />
</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn primary icon-only type="button">
  <i class="fas fa-microphone"></i>
</dg-btn>

Small Icon Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--ghost dg-btn--icon-only dg-btn--sm">
  <i class="fas fa-times"></i>
</button>
import { Btn } from '@deepgram/styles/react';

<Btn ghost iconOnly sm type="button">
  <i className="fas fa-times" />
</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn ghost icon-only sm type="button">
  <i class="fas fa-times"></i>
</dg-btn>

Collapse Button

Collapse Primary Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--primary dg-btn--collapse">Full Width on Mobile</button>
import { Btn } from '@deepgram/styles/react';

<Btn primary collapse type="button">Full Width on Mobile</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn primary collapse type="button">Full Width on Mobile</dg-btn>

Collapse Ghost Button

Main call-to-action button with primary brand color

<button type="button" class="dg-btn dg-btn--ghost dg-btn--collapse">Responsive Ghost</button>
import { Btn } from '@deepgram/styles/react';

<Btn ghost collapse type="button">Responsive Ghost</Btn>
<script type="module">
  import '@deepgram/styles/wc';
</script>

<dg-btn ghost collapse type="button">Responsive Ghost</dg-btn>